OWASP/owasp-java-encoder

General questions - Core java library

Opened this issue · 10 comments

Hey Guys - Awesome work, keep it work!

  1. [1] Rule#1 suggests that we also need to encode "/" character as it can be used to end HTML entity but it doesn't seem like java encoder does it any HTML context encoders. Is there a reason why you guys decided not to encode this specific character? If it is not necessary don't we need to update OWASP wiki?

  2. [1] Rule#2 suggests that we need to encode characters like "%,*,......." for non-attributed characters but again I don't see them in forHtmlUnquotedAttribute function. IMO they don't break the context, so don't we need to change the OWASP wiki if it's not needed? or am I missing something here?

  3. Why can't we just encode ( and ) characters in cssURL context and have only 1 function for CSS encoding? I don't see a reason why we need to have non-encoded ( and ) characters in cssURL?

Are you guys aware of any other enterprises using this library?

A quick response will be highly appreciated :) ..

[1] https://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet

Hey Jim - Did you get a chance to look at my questions?

Thanks for your quick response Jim. Appreciate it :)

I will surely be interested in it. I will let you know once I get some free time.

Also, why are there two TLD files under [1], which one should I be using?

[1] https://github.com/OWASP/owasp-java-encoder/tree/82d874d3fc315c47905ebf264bfe2a0079f0044a/jsp/src/main/resources/META-INF

I see that advanced one exposes additional tags of JS(attribute etc.) and XML encoder which we anyway are exposing in core by default.