You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WEBrick allows CR (\r) within header values. RFC 9110 says not to do this:
Field values containing CR, LF, or NUL characters are invalid and dangerous, due to the varying ways that implementations might parse and interpret those characters; a recipient of CR, LF, or NUL within a field value MUST either reject the message or replace each of those characters with SP before further processing or forwarding of that message.
The suggested fix here would be to reject requests with headers containing bare CR.
The text was updated successfully, but these errors were encountered:
Disallow bare CR, LF, NUL in header and request lines. Tighten
parsing of request lines to only allow single spaces, as specified
in the RFCs.
Forcing this RFC-compliant behavior breaks a lot of tests, so
fix the tests to correctly use CRLF instead of LF for requests
(other than the specific checks for handling of bad requests).
Fixesruby#137
@kenballus I submitted #138 to attempt to fix this, but it goes a little further than just disallowing CR in header values. Any chance you could review and let me know if I've made it stricter than what the RFCs allow?
WEBrick allows CR (
\r
) within header values. RFC 9110 says not to do this:The suggested fix here would be to reject requests with headers containing bare CR.
The text was updated successfully, but these errors were encountered: