-
Notifications
You must be signed in to change notification settings - Fork 65
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
Add nonce validation to SessionService #766
Merged
Merged
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
bagofarms
reviewed
Feb 15, 2022
Taking a look at this again, I'm wondering if it makes more sense to just integrate this into the |
@rob-3 If it's only ever used in relation to a session, I think it would make more sense integrated into the |
Fixes ucfopen#728. This implements nonce functionality to prevent replay attacks on UDOIT. I've never implemented nonce functionality before, so the below code may contain security issues I'm ignorant of, but I gave it my best shot based on what I could find online. Essentially, by sending the random nonce back and forth, we can prevent an attacker from resending an encrypted POST request with potentially bad consequences, because the nonce can only be used once.
rob-3
changed the title
Add NonceService to validate nonces
Add nonce validation to SessionService
Feb 24, 2022
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.
@bagofarms I would appreciate if you could review this as it is a security matter and I want to make sure it is correct. I'm still planning to update the code to return a non 500 error message but the security stuff should be done.
Edit: something seems to be broken already; let me investigateEdit: ready to merge whenever this can be reviewed