JoyOfCoding icon indicating copy to clipboard operation
JoyOfCoding copied to clipboard

Include XSS prevention in REST API examples

Open DavidWhitlock opened this issue 2 years ago • 1 comments

Even though classes like AirlineServlet do not output HTML, the code really should do something to protect against XSS attacks. It would be a good example.

Here are some ideas from OWASP:

https://cheatsheetseries.owasp.org/cheatsheets/Injection_Prevention_in_Java_Cheat_Sheet.html#htmljavascriptcss

DavidWhitlock avatar Jun 04 '22 12:06 DavidWhitlock

Considering using https://owasp.org/www-project-java-html-sanitizer/

DavidWhitlock avatar Jun 18 '22 12:06 DavidWhitlock