aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public_key/test/pkits_SUITE.erl
diff options
context:
space:
mode:
authorMichael Santos <[email protected]>2011-02-21 13:53:56 -0500
committerNiclas Axelsson <[email protected]>2011-02-22 15:35:05 +0100
commit4827d5db5fb2ca10772f70fbb6ad7f7f99285d96 (patch)
treeb681371a39d8cb62eefaea436f28f5f51e5868e3 /lib/public_key/test/pkits_SUITE.erl
parentb0d6abb72cf32df548703b284b737a4a7c0a9d8a (diff)
downloadotp-4827d5db5fb2ca10772f70fbb6ad7f7f99285d96.tar.gz
otp-4827d5db5fb2ca10772f70fbb6ad7f7f99285d96.tar.bz2
otp-4827d5db5fb2ca10772f70fbb6ad7f7f99285d96.zip
inets: prevent XSS in error pages
Prevent user controlled input from being interpreted as HTML in error pages by encoding the reserved HTML characters. The reserved character set should be safe for displaying data within the body of HTML pages as outlined here: http://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_Cheat_Sheet Previously, weird URLs were URI encoded in the error page. This worked quite well but the URL would be displayed in the HTML in percent encoded format. There was also a check for URIs that were already escaped (by the browser) that would fail if the browser sent an URI containing a "%", e.g.: w3m "http://localhost:8080/<b>foo</b>?%" Also encode the HTTP method and version, since it's possible they may be manipulated: <b>FOO</b> /index.html HTTP/1.0 GET /index.html <b>foo</b>/1.0 Encode the static messages to prevent characters from being interpreted as HTML such as "heavy load (>~w processes)".
Diffstat (limited to 'lib/public_key/test/pkits_SUITE.erl')
0 files changed, 0 insertions, 0 deletions