Repository navigation
Set Cache-Control no-store on the GSSP sso return page - #54
Open
kayjoosten wants to merge 1 commit into
Open
kayjoosten wants to merge 1 commit into
kayjoosten wants to merge 1 commit into
Conversation
Prior to this change, the /saml/sso_return page only carried Symfony's default "no-cache, private". no-cache governs reuse, not storage, and browsers may serve a stored page on history navigation without revalidating. Pressing back therefore re-ran the auto-submit form and re-POSTed an assertion whose state was already invalidated, breaking the login. This change sets "Cache-Control: no-store" on the response in SSOReturnController::createSamlResponse(), so the page is never stored and the back button shows the "no request state present" error. A Behat step asserts the directive in the authentication, registration and error scenarios, which cover every path that returns a signed SAML response. #53
Contributor
|
Todo: Refine with Pieter and Bas, we have not yet disussed this |
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.
Summary
Sets
Cache-Control: no-storeon the/saml/sso_returnpage inSSOReturnController::createSamlResponse().Why
Prior to this change the page only carried Symfony's default
no-cache, private.no-cachegoverns reuse, not storage, and browsers may serve a stored page on history navigation without revalidating. Pressing back re-ran the auto-submit form and re-POSTed an assertion whose state was already invalidated, which broke the login.How
no-store(Symfony still addsprivate), so the page is never stored and the back button shows the "no request state present" error.Testing
All Behat scenarios, PHPUnit, phpcs, phpmd, phpstan, docheader and phplint pass locally.
Closes #53