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

Fix #6883 relative welcome redirect #6886

Merged
merged 5 commits into from
Sep 22, 2021

Conversation

gregw
Copy link
Contributor

@gregw gregw commented Sep 21, 2021

Fix #6883 relative welcome redirect

  • make all redirects able to be relative
  • added test for relative redirection in ResourceService

Signed-off-by: Greg Wilkins [email protected]

Fix #6883 relative welcome redirect
 + make all redirects able to be relative
 + added test for relative redirection in ResourceService

Signed-off-by: Greg Wilkins <[email protected]>
@lachlan-roberts
Copy link
Contributor

@gregw the new tests do not seem to test the original issue. I locally reverted the changes to ResourceService and all the new tests in DefaultServletTest still passed.

@gregw
Copy link
Contributor Author

gregw commented Sep 22, 2021

@lachlan-roberts good catch. There is a bug in HttpFieldsContainsHeaderValue, it just looks for a substring rather than a proper containment.
I'll see if I can fix that... else I'll need another matcher.

Fix the HttpFieldsContainsHeaderValue impl

Signed-off-by: Greg Wilkins <[email protected]>
@gregw
Copy link
Contributor Author

gregw commented Sep 22, 2021

@lachlan-roberts I've pushed a fix for that, but there is a good chance it might break some other tests that were relying on the wrong behavior

@gregw gregw merged commit 34c7344 into jetty-9.4.x Sep 22, 2021
@gregw gregw deleted the jetty-9.4.x-6883-relative-welcome-redirect branch September 22, 2021 22:16
gregw added a commit that referenced this pull request Sep 22, 2021
Fix #6883 relative welcome redirect
 + make all redirects able to be relative
 + added test for relative redirection in ResourceService

Signed-off-by: Greg Wilkins <[email protected]>
gregw added a commit that referenced this pull request Sep 23, 2021
* Fix #6883 relative welcome redirect (#6886)

Fix #6883 relative welcome redirect
 + make all redirects able to be relative
 + added test for relative redirection in ResourceService

Signed-off-by: Greg Wilkins <[email protected]>
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.

Welcome file redirects do not honor the relativeRedirectAllowed option
3 participants