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

RedirectRegexRule and RewritePatternRule should consider relativeRedirectAllowed #11014

Closed
dsmiley opened this issue Dec 3, 2023 · 1 comment · Fixed by #11019
Closed

RedirectRegexRule and RewritePatternRule should consider relativeRedirectAllowed #11014

dsmiley opened this issue Dec 3, 2023 · 1 comment · Fixed by #11019

Comments

@dsmiley
Copy link

dsmiley commented Dec 3, 2023

There is an HttpConfiguration option "relativeRedirectAllowed" that is taken into consideration by sendRedirect(). But RedirectRegexRule and RewritePatternRule don't use that sendRedirect. Perhaps they should?

@gregw
Copy link
Contributor

gregw commented Dec 4, 2023

This already appears fixed in Jetty-12 as we do this check in Request.toRedirectURI which is used by the rewrite rules.. although there is a TODO there.
Thus this is mostly a 10/11 issue.

gregw added a commit that referenced this issue Dec 4, 2023
+ Handle request relative redirects
+ Moved to Response
+ Changed default to allow relative
gregw added a commit that referenced this issue Dec 4, 2023
Common relative redirect method.
Use the relative redirect method from redirection rules.

Signed-off-by: gregw <gregw@webtide.com>
gregw added a commit that referenced this issue Dec 4, 2023
+ Handle request relative redirects
+ Moved to Response
+ Changed default to allow relative
gregw added a commit that referenced this issue Dec 4, 2023
+ Handle request relative redirects
+ Moved to Response
+ Changed default to allow relative
gregw added a commit that referenced this issue Dec 4, 2023
+ Handle request relative redirects
+ Moved to Response
+ Changed default to allow relative
gregw added a commit that referenced this issue Dec 4, 2023
+ Handle request relative redirects
+ Moved to Response
+ Changed default to allow relative
gregw added a commit that referenced this issue Dec 4, 2023
+ Handle request relative redirects
+ Moved to Response
+ Changed default to allow relative
gregw added a commit that referenced this issue Dec 4, 2023
+ Handle request relative redirects
+ Moved to Response
+ Changed default to allow relative
gregw added a commit that referenced this issue Dec 6, 2023
)

* Improve relative redirect handling #11014
* Common relative redirect method.
* Use the relative redirect method from redirection rules.

Signed-off-by: gregw <gregw@webtide.com>
gregw added a commit that referenced this issue Dec 6, 2023
* Cleanup of relative redirect handling #11014
+ Handle request relative redirects
+ Moved to Response
+ Changed default to allow relative
* Updates to javadoc
@gregw gregw closed this as completed Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: ✅ Done
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants