Skip to content
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

fix: use time-constant comparison for CSRF tokens #12188

Merged
merged 4 commits into from
Feb 1, 2021
Merged

fix: use time-constant comparison for CSRF tokens #12188

merged 4 commits into from
Feb 1, 2021

Conversation

TatuLund
Copy link
Contributor

@TatuLund TatuLund commented Jan 28, 2021

This hardens the framework against a theoretical timing attack based on
comparing how quickly a request with an invalid CSRF token is rejected.


This change is Reviewable

This hardens the framework against a theoretical timing attack based on
comparing how quickly a request with an invalid CSRF token is rejected.
TatuLund added a commit that referenced this pull request Jan 28, 2021
This is the same as #12188, but also applied for the upload security key
and the push id since both of those are also used to protect against
cross-site attacks. In addition, documentation for the push id is
clarified to point out its role.
@TatuLund
Copy link
Contributor Author

Picked from: vaadin/flow@292b3a0

@TatuLund TatuLund added this to the 8.12.3 milestone Jan 28, 2021
Ansku pushed a commit that referenced this pull request Jan 29, 2021
This is the same as #12188,
but also applied for the upload security key
and the push id since both of those are also used to protect against
cross-site attacks. In addition, documentation for the push id is
clarified to point out its role.

Cherry-picked from: vaadin/flow#9896
Copy link
Member

@Ansku Ansku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2 of 2 files at r2.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@Ansku Ansku merged commit 7cb91b3 into master Feb 1, 2021
@Ansku Ansku deleted the csrf-fix1-1 branch February 1, 2021 15:51
@AdamGold
Copy link

AdamGold commented Feb 2, 2021

Hey! when are you planning to release this?

@TatuLund
Copy link
Contributor Author

TatuLund commented Feb 3, 2021

Hey! when are you planning to release this?

@AdamGold in the best possible speed.

Ansku pushed a commit that referenced this pull request Feb 3, 2021
This is the same as #12188,
but also applied for the upload security key
and the push id since both of those are also used to protect against
cross-site attacks. In addition, documentation for the push id is
clarified to point out its role.

Cherry-picked from: vaadin/flow#9896
Ansku added a commit that referenced this pull request Feb 3, 2021
This is the same as #12188,
but also applied for the upload security key
and the push id since both of those are also used to protect against
cross-site attacks. In addition, documentation for the push id is
clarified to point out its role.

Cherry-picked from: vaadin/flow#9896

Authored-by: Tatu Lund <[email protected]>
Ansku pushed a commit that referenced this pull request Feb 3, 2021
This hardens the framework against a theoretical timing attack based on
comparing how quickly a request with an invalid CSRF token is rejected.

Cherry-picked from: vaadin/flow#9875
Ansku added a commit that referenced this pull request Feb 3, 2021
This hardens the framework against a theoretical timing attack based on
comparing how quickly a request with an invalid CSRF token is rejected.

Cherry-picked from: vaadin/flow#9875

Authored-by: Tatu Lund <[email protected]>
Ansku pushed a commit that referenced this pull request Feb 4, 2021
This hardens the framework against a theoretical timing attack based on
comparing how quickly a request with an invalid CSRF token is rejected.

Backporting of #12188
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants