Skip to content

client/web: fix CSRF handler order in web UI (#15143)#15156

Merged
patrickod merged 1 commit intorelease-branch/1.80from
patrickod/backport-csrf-fix
Feb 27, 2025
Merged

client/web: fix CSRF handler order in web UI (#15143)#15156
patrickod merged 1 commit intorelease-branch/1.80from
patrickod/backport-csrf-fix

Conversation

@patrickod
Copy link
Copy Markdown
Contributor

Fix the order of the CSRF handlers (HTTP plaintext context setting, then enforcement) in the construction of the web UI server. This resolves false-positive "invalid Origin" 403 exceptions when attempting to update settings in the web UI.

Add unit test to exercise the CSRF protection failure and success cases for our web UI configuration.

Updates #14822
Updates #14872

Fix the order of the CSRF handlers (HTTP plaintext context setting,
_then_ enforcement) in the construction of the web UI server. This
resolves false-positive "invalid Origin" 403 exceptions when attempting
to update settings in the web UI.

Add unit test to exercise the CSRF protection failure and success cases
for our web UI configuration.

Updates #14822
Updates #14872

Signed-off-by: Patrick O'Doherty <patrick@tailscale.com>
@patrickod patrickod requested a review from awly February 27, 2025 22:01
@patrickod patrickod merged commit ac4b096 into release-branch/1.80 Feb 27, 2025
47 checks passed
@patrickod patrickod deleted the patrickod/backport-csrf-fix branch February 27, 2025 22:18
@patrickod patrickod restored the patrickod/backport-csrf-fix branch March 3, 2025 17:22
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.

2 participants