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

ComponentUtils.getHrefURL: lack of encoding #3409

Closed
cnsgithub opened this issue Mar 5, 2018 · 4 comments
Closed

ComponentUtils.getHrefURL: lack of encoding #3409

cnsgithub opened this issue Mar 5, 2018 · 4 comments
Labels
enhancement Additional functionality to current component
Milestone

Comments

@cnsgithub
Copy link
Contributor

cnsgithub commented Mar 5, 2018

As already mentioned in this commit comment parameter keys are not encoded. This may lead to HTTP parameter pollution.

Fragments are also not encoded. See comment below

cnsgithub added a commit to cnsgithub/primefaces that referenced this issue Mar 5, 2018
@cnsgithub
Copy link
Contributor Author

PR: #3410

@cnsgithub
Copy link
Contributor Author

@jasonex7 Your method seems to assume that the baseUrl already is correctly encoded in all parts: paths, parameters, fragment. Is that correct? Then we should make it a convention in javadoc or maybe annotate the baseUrl parameter with @Encoded (borrow from javax.ws.rs?) to avoid double encoding. What do you think?

tandraschko added a commit that referenced this issue Mar 15, 2018
@tandraschko tandraschko added the enhancement Additional functionality to current component label Mar 15, 2018
@tandraschko tandraschko added this to the 6.3 milestone Mar 15, 2018
@jasonex7
Copy link
Contributor

@cnsgithub I encode only the values of OutcomeTarget.getParams() because the original request had only EL in value attribute, but it's good that param key was also encoded. Thanks for the observation and commit.

@cnsgithub
Copy link
Contributor Author

@jasonex7 Ok. However, as getHrefURL is located in ComponentUtils, you have to expect it to be used in other locations as well in future.

Rapster added a commit to Rapster/primefaces that referenced this issue Jul 8, 2023
Rapster added a commit to Rapster/primefaces that referenced this issue Jul 8, 2023
Rapster added a commit to Rapster/primefaces that referenced this issue Oct 15, 2023
Rapster added a commit to Rapster/primefaces that referenced this issue Oct 15, 2023
Rapster added a commit to Rapster/primefaces that referenced this issue May 26, 2024
Rapster added a commit to Rapster/primefaces that referenced this issue May 26, 2024
Rapster added a commit to Rapster/primefaces that referenced this issue Jun 8, 2024
Rapster added a commit to Rapster/primefaces that referenced this issue Jun 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Additional functionality to current component
Projects
None yet
Development

No branches or pull requests

3 participants