Repository navigation
Keep the proxy prefix when going back from "Reset two-factor" and "Turn off" - #1
Merged
Merged
Conversation
…rn off" Behind a reverse proxy that mounts the shop under a prefix (X-Forwarded-Prefix, e.g. example.com/store), the forms on the grid and the edit page used app.request.requestUri: the bare request path, which Symfony never prefixes. After the operation the administrator landed at the root of the domain, where another site may live. The forms now carry the page's full address (app.request.uri) and the controller accepts it when it points at this site. The test application trusts the test client as a proxy, so a functional test can mount it under a prefix. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
What
Behind a reverse proxy that mounts the shop under a prefix (
X-Forwarded-Prefix, e.g.example.com/store), Reset two-factor and Turn off (grid and edit page) came back to/admin/users/...without the prefix, i.e. to the root of the domain, where another site may live.The forms used
app.request.requestUri: the bare request path, which Symfony never prefixes (onlygetBaseUrl()/getUri()and the router know about the trusted prefix).How
app.request.uri).ManageActionaccepts a_redirectthat is a local path or an absolute URL of this site; any other host still falls back to the administrators list (covered by a new functional test)./storeand check the addresses the pages render and the redirect after the POST.Checks
ecs,phpstan,lint:container,lint:twig,lint:yaml,phpunit(82 tests) pass locally.🤖 Generated with Claude Code