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

Update owasp.txt #188

Merged
merged 1 commit into from May 11, 2016
Merged

Update owasp.txt #188

merged 1 commit into from May 11, 2016

Conversation

s-tikhomirov
Copy link
Contributor

@formanek formanek merged commit 19b3689 into find-sec-bugs:master May 11, 2016
@formanek
Copy link
Contributor

Thanks

@h3xstream
Copy link
Member

I'm not sure about the purpose of this modification.

encodeForURL is expected to be safe from XSS in the specific context of URLs.

Example:

String html = "<a href=\"http://"+Encoder.encodeFromURL(req.getParameter("input"))+"\">Click me</a>"

The decode on the other hand does not provide any protection regarding escaping..

String html = "<a href=\"http://"+Encoder.decodeFromURL(req.getParameter("input"))+"\">Click me</a>"

@formanek
Copy link
Contributor

@h3xstream the - sign before the tag means that tag is removed by the method, so the value is considered insecure after decoding even if it was encoded before.

@h3xstream
Copy link
Member

@formanek Got it ! Thanks

@h3xstream h3xstream added the enhancement New feature or improvement to existing detector. label May 11, 2016
@h3xstream h3xstream added this to the version-1.4.6 milestone May 11, 2016
h3xstream added a commit that referenced this pull request May 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement to existing detector.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants