[ 
https://issues.apache.org/jira/browse/LANG-871?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13835998#comment-13835998
 ] 

Maurizio Cucchiara edited comment on LANG-871 at 1/26/15 2:03 PM:
------------------------------------------------------------------

[~bayard],
though I agree with you, the truth is that there are many 
frameworks/applications which rely on escape* methods in terms of security.

[~aree] An example would be appreciated.


was (Author: maurizio.cucchiara):
[~bayard],
thought I agree with you, the truth is that there are many 
framework/application which rely on escape* methods in terms of security.

[~aree] An input example would be appreciated.

> [XSS] Possible attacks through StringEscapeUtils.escapeEcmaScript?
> ------------------------------------------------------------------
>
>                 Key: LANG-871
>                 URL: https://issues.apache.org/jira/browse/LANG-871
>             Project: Commons Lang
>          Issue Type: Bug
>          Components: lang.*
>    Affects Versions: 3.1
>            Reporter: Andy Reek
>              Labels: XSS
>             Fix For: Discussion
>
>
> org.apache.commons.lang3.StringEscapeUtils.escapeEcmaScript does the escape 
> via a prefixed '\' on all characters which must be escaped. I am not sure if 
> this is really secure, if am looking at the comments on 
> https://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet#RULE_.233_-_JavaScript_Escape_Before_Inserting_Untrusted_Data_into_JavaScript_Data_Values.
>  They say it is possible to do an attack by escape the escape. I tested this 
> with the string '\"' and the output was '\\\"'. Is this really 
> ecma-/java-script secure? Or is it better to use the implementation used by 
> OWASP?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to