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

UNDERTOW-1565 Don't encode query strings and URI paths while redirecting #785

Merged
merged 1 commit into from Jul 29, 2019
Merged

UNDERTOW-1565 Don't encode query strings and URI paths while redirecting #785

merged 1 commit into from Jul 29, 2019

Conversation

jaikiran
Copy link
Contributor

The commit here fixes the issue reported in https://issues.jboss.org/browse/UNDERTOW-1565

The code in SinglePortConfidentialityHandler which deals with forming the redirect URI was using the 7 argument constructor of java.net.URI, which as per its javadoc, internally encodes the passed parameters, like the queryString. We do not want that to happen, since the query string and other components of the URI that we are building aren't expected to be decoded/encoded, by the container, while we are building the redirect URI.

The commit here uses a StringBuilder to form the redirect URI and then passes it to the single argument constructor of java.net.URI which doesn't do the encoding of the passed parameter, unlike the 7 argument constructor.

The commit also includes an update to an existing testcase to reproduce the issue and verify the fix.

@jaikiran
Copy link
Contributor Author

retest this please

@jaikiran
Copy link
Contributor Author

These failures don't look related to this change (and in fact the tests work fine locally)

@fl4via fl4via merged commit 112d763 into undertow-io:master Jul 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants