sozu-proxy / sozu

Sōzu HTTP reverse proxy, configurable at runtime, fast and safe, built in Rust. It is awesome!
https://www.sozu.io/
GNU Affero General Public License v3.0
3.12k stars 193 forks source link

Refine granularity of 400 and 502 error diagnostics #1151

Closed Wonshtrum closed 2 weeks ago

Wonshtrum commented 2 weeks ago

Follow up to #1143 and #1150. This splits the DETAILS variable of errors 400 and 502 into 3 hexadecimal buffers SUCCESSFULLY_PARSED, PARTIALLY_PARSED, and INVALID. This avoids any XSS attacks from this variable. The last valid header/trailer/cookie has also been removed from MESSAGE. The new 400 and 502 use JavaScript to display the hexadecimal buffers as utf-8 (using the safe innerText) and hopefully help the client fix the problem: image

Keksoj commented 2 weeks ago

should solve #1150