-
-
Notifications
You must be signed in to change notification settings - Fork 189
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
BUGFIX: Fix UriConstraints port constraints for default ports #2715
Conversation
Previously, if `UriConstraints` were applied to an URL with a non-default port (e.g. "8080") this port constraint was applied to the target URL even if no explicit port constraint was set. Fixes: #2714
@albe good question! They're related indeed, this one is complemental: #2654 makes sure that UriConstraints::create()
->withScheme('https')
->applyTo(new Uri('http://some-domain.tld'), false); results in #2276 makes sure that UriConstraints::create()
->withPort(8080)
->applyTo(new Uri('http://some-domain.tld:8080'), true); results in and this PR makes sure that UriConstraints::fromUri(new Uri('https://some-other-domain.tld'))
->applyTo(new Uri('https://some-domain.tld:8080'), false); results in This whole UriConstraints topic got rather confusing because there are much more cases than I had anticipated at first. |
I don't understand why the Psalm test fails
But I don't think that it's related to this change |
Yes, unrelated. This error is around still some time now - see #2704 which tries to solve the issue in master after psalm has been disabled for now. Thanks for the clear explanation! The first two make a lot of sense. The third one, which this PR targets is not so straightforward. Given |
The scenario in Neos 8.0 will be: Your development machine is configured to run on port 8080 but you don't want to include that port to all external shortcuts :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds reasonable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the explanation! :)
Previously, if
UriConstraints
were applied to an URL with a non-defaultport (e.g. "8080") this port constraint was applied to the target URL even
if no explicit port constraint was set.
Fixes: #2714