OWASP / wstg

The Web Security Testing Guide is a comprehensive Open Source guide to testing the security of web applications and web services.
https://owasp.org/www-project-web-security-testing-guide/
Creative Commons Attribution Share Alike 4.0 International
7.04k stars 1.3k forks source link

Wrong usage of JS functions (Appendix: Leveraging Dev Tools - Encoding and Decoding) #1070

Open ukusormus opened 1 year ago

ukusormus commented 1 year ago

What's the issue?

In Appendix: Leveraging Dev Tools > Encoding and Decoding:

How do we solve it?

kingthorin commented 1 year ago

Thanks @ukusormus, feel up for tackling the change(s)?

How do we solve it? Remove current form of HTML encoding/decoding. Maybe look for a better JavaScript solution or omit it entirely?

Let's omit it.

Rename the usage of URL encode/decode to reflect that they're meant for URL parameter values, and/or add encodeURI() also. See more: When are you supposed to use escape instead of encodeURI / encodeURIComponent? - an answer on Stack Overflow

Clarify what it's meant for, and add encodeURI().