Merged
Conversation
skjnldsv
approved these changes
Oct 4, 2019
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
fc91769 to
329059d
Compare
Member
|
/compile amend / |
329059d to
12378f4
Compare
Member
I don't understand why 🤔 |
727184f to
8167caa
Compare
Member
Let's try if the lockfile was an issue, since tests are using EDIT: the answer is no ^^' |
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at> Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
8167caa to
81613d2
Compare
Member
|
Built it again and suddenly it works --" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I found a bug in the
nextcloud-axios(now@nextcloud/axios) package: we read theOC.requesttokenjust once. But the token can actually change over time.As there is no simple solution to intercept every request with Axios (only PUT, POST, DELETE and PATCH), I updated the package (and
@nextcloud/auth) to listen to an event on the new event bus.The server now emits the events so that other modules that need the token can stay in sync.
This PR is split into two parts
@nextcloud/axioswhich listens to the event (via@nextcloud/auth) and thus always uses the correct tokenTo test this PR you can either wait for the CSRF token to expire or just run
_nc_event_bus.emit('csrf-token-update', {token: 123}). On the apps page, for example, you should see 412 errors if you emit an invalid token.