-
Notifications
You must be signed in to change notification settings - Fork 395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
7.x - CSRF bugfix #2839
Closed
Atmire-Kristof
wants to merge
12
commits into
DSpace:dspace-7_x
from
atmire:w2p-111801_CSRF-bugfix-7_x
Closed
7.x - CSRF bugfix #2839
Atmire-Kristof
wants to merge
12
commits into
DSpace:dspace-7_x
from
atmire:w2p-111801_CSRF-bugfix-7_x
Conversation
This file contains 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
…-to-all-requests-7.2
…-to-all-requests-7.4
…-to-all-requests-7.6-next
…-to-all-requests-7.2
…-to-all-requests-7.4
…-to-all-requests-7.6-next
….6-next' into w2p-111801_CSRF-bugfix-7.6
This was referenced Feb 27, 2024
Closed
Closing, replaced by #3063 which is a backport of the code added to |
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.
References
Description
This PR adds a
/api/security/csrf
endpoint to send POST requests to, which returns the appropriate CSRF headers/cookies, avoiding any subsequent POST request from failing before CSRF headers are set.Instructions for Reviewers
Changes made:
XSRFService
will send out a POST request to the new csrf endpoint (browser-side, since server-side can only send GET requests)For testing, I'd advise setting up both Angular and REST side of this PR (note, when referring to csrf cookie, I'm talking about "DSPACE-XSRF-COOKIE"):
Checklist
This checklist provides a reminder of what we are going to look for when reviewing your PR. You need not complete this checklist prior to creating your PR (draft PRs are always welcome). If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!
yarn lint
yarn check-circ-deps
)package.json
), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.