You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix that auth tokens would sometimes be overwritten (#8738)
Quoting from Silhouette’s BearerTokenAuthenticator docstring for
`update`:
```
* Updates the authenticator with the new last used date in the backing store.
*
* We needn't embed the token in the response here because the token itself will not be changed.
* Only the authenticator in the backing store will be changed.
```
Our implementation of `update` did something else. It fetched *any*
authenticator of the same user and changed not only the last used date
time but also the value. So if update was called by silhouette on a
datastore token, it could happen that an Authentication token was
changed.
This bug has been in place ever since
#2149 but to trigger it,
a request has to be sent to `/api/` with a valid *datastore* token. We
don’t usually do that, but the libs tests seem to do so now. That is
also a libs bug.
This also caused the webknossos-libs tests to get 401 responses when
using X-Auth-Tokens that were lost in this way.
### Steps to test:
- Requests with X-Auth-Token should work, token should stay fixed.
- Normal datastore/tracingstore operation should also still work
------
- [x] Added changelog entry (create a `$PR_NUMBER.md` file in
`unreleased_changes` or use `./tools/create-changelog-entry.py`)
- [x] Considered [common edge
cases](../blob/master/.github/common_edge_cases.md)
0 commit comments