-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Field-name syntax #30
Comments
My opinion is that Apache httpd team would prefer to reduce the syntax to reduce the security issues. |
Discussed in Montreal; interest in doing something, take to list. |
I'm not sure why this is being considered. All browsers support headers such as |
…testonly Automatic update from web-platform-testsXHR: test unusual header name syntax For httpwg/http-core#30. -- wpt-commits: b3e1de8dc92db9c4f400e622c9ff1582566d61fa wpt-pr: 13517
…testonly Automatic update from web-platform-testsXHR: test unusual header name syntax For httpwg/http-core#30. -- wpt-commits: b3e1de8dc92db9c4f400e622c9ff1582566d61fa wpt-pr: 13517
…testonly Automatic update from web-platform-testsXHR: test unusual header name syntax For httpwg/http-core#30. -- wpt-commits: b3e1de8dc92db9c4f400e622c9ff1582566d61fa wpt-pr: 13517
The restrictions exist to protect legacy server gateways (like CGI) that are far more restrictive than browsers need to be due to the terrible idea of passing names through env vars and command-lines. |
in bkk: no real consensus, concern about compatibility. reconsider on impact of a case by cases |
For the record, NGINX drops request header fields with names containing characters other than letters, digits, hyphens and optionally underscores (if configured using |
Since I'm seeing the conversation moved from the WG to GH, I'm just pasting what I sent there for completeness. Right now haproxy only accepts : As Roy mentioned, the restriction is to avoid trouble with CGIs doing : Characters like backquote (`), dollar ($), or pipe(|) have long been abused to attack servers... |
Also I proposed that we could do something less extreme than blocking messages containing such header field names, we could recommend to simply drop these fields by default. This will have no impact if they're here by accident. Then we can let the agents decide if they want to let them pass or not. Thus we could make the difference between "forbidden characters" (the historical ones) and "unusual characters" (those excluded by the new, more restrictive list). |
Discussed in Bangkok, but no consensus on an approach. |
ietf104: still seeking data for characters used in the wild. http archive mentioned as a possible source. |
…testonly Automatic update from web-platform-testsXHR: test unusual header name syntax For httpwg/http-core#30. -- wpt-commits: b3e1de8dc92db9c4f400e622c9ff1582566d61fa wpt-pr: 13517 UltraBlame original commit: 889615275c32ec0a7fa79b4fd2daa3423165dcdf
…testonly Automatic update from web-platform-testsXHR: test unusual header name syntax For httpwg/http-core#30. -- wpt-commits: b3e1de8dc92db9c4f400e622c9ff1582566d61fa wpt-pr: 13517 UltraBlame original commit: 08d16a54e859b7de860fc345a4cdb9e0449f0cef
…testonly Automatic update from web-platform-testsXHR: test unusual header name syntax For httpwg/http-core#30. -- wpt-commits: b3e1de8dc92db9c4f400e622c9ff1582566d61fa wpt-pr: 13517 UltraBlame original commit: 889615275c32ec0a7fa79b4fd2daa3423165dcdf
…testonly Automatic update from web-platform-testsXHR: test unusual header name syntax For httpwg/http-core#30. -- wpt-commits: b3e1de8dc92db9c4f400e622c9ff1582566d61fa wpt-pr: 13517 UltraBlame original commit: 08d16a54e859b7de860fc345a4cdb9e0449f0cef
…testonly Automatic update from web-platform-testsXHR: test unusual header name syntax For httpwg/http-core#30. -- wpt-commits: b3e1de8dc92db9c4f400e622c9ff1582566d61fa wpt-pr: 13517 UltraBlame original commit: 889615275c32ec0a7fa79b4fd2daa3423165dcdf
…testonly Automatic update from web-platform-testsXHR: test unusual header name syntax For httpwg/http-core#30. -- wpt-commits: b3e1de8dc92db9c4f400e622c9ff1582566d61fa wpt-pr: 13517 UltraBlame original commit: 08d16a54e859b7de860fc345a4cdb9e0449f0cef
I'm sceptical about the "protect CGI servers" (and servers similar to those). We have 2020; shouldn't these all have their own protections by now? |
Discussed in Basel; suggestion is to document "safe" characters in prose (for now), both below the ABNF and in the new header field recommendations. |
Those CGI servers cannot protect themselves. The issue is that both hyphens and underscores are converted to underscores in CGI servers, so both |
Hey Piotr, We chatted about that here and tend to agree -- will remove underscore and see how that goes down. |
Well, to be clear, it is the HTTP server that invokes CGI that is creating the environment variables from the received header fields. That server is responsible for avoiding bad transformations, such as the underscore problem above. However, since we are just talking about the characters that are good practice, we can exclude underscores since they are not commonly used in field names. |
Header field-names are defined as tokens. This is an extremely permissive syntax, including characters that will cause confusion and likely break some senders/recipients.
Most of the special characters allowed are not in the registry or seen "in the wild." Some research would be good to substantiate their use, but a starting point might be:
There are a number of strategies we could take to the transition:
Like
OWS
/BWS
, mark some characters as "do not generate" but "should consume"Disallow registration of header fields with those characters, and discourage their use in unregistered headers
If we have more confidence that they're not in use, just ignore headers containing those characters.
The text was updated successfully, but these errors were encountered: