Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Issue 2101963002: Skip header lines with invalid header name (Closed)

Created:
4 years, 5 months ago by robwu
Modified:
4 years, 5 months ago
Reviewers:
mmenke
CC:
chromium-reviews, cbentzel+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Skip header lines with invalid header name The current header parsing algorithm is too lax and results in the creation of a header data structure with invalid headers. This patch makes the parser more strict, by rejecting header names that are not complying with RFC 7230 (field-name must be a token). Enforcing this standard should be web-compatible since Firefox (47) also follows this behavior. BUG=620365 Committed: https://crrev.com/78f29ac0214e16bdcc6eaa17fa4a5a84882bb7a8 Cr-Commit-Position: refs/heads/master@{#402498}

Patch Set 1 #

Total comments: 5

Patch Set 2 : Split test #

Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -1 line) Patch
M net/http/http_util.cc View 1 chunk +1 line, -1 line 0 comments Download
M net/http/http_util_unittest.cc View 1 1 chunk +20 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (5 generated)
robwu
4 years, 5 months ago (2016-06-28 06:28:45 UTC) #2
mmenke
Thanks for doing this! In your description, RGC -> RFC, and you should cite RFC ...
4 years, 5 months ago (2016-06-28 14:51:20 UTC) #3
mmenke
LGTM. Even if FireFox is doing something similar, it could be just different enough that ...
4 years, 5 months ago (2016-06-28 14:54:01 UTC) #4
robwu
https://codereview.chromium.org/2101963002/diff/1/net/http/http_util.cc File net/http/http_util.cc (right): https://codereview.chromium.org/2101963002/diff/1/net/http/http_util.cc#newcode913 net/http/http_util.cc:913: if (!IsToken(name_begin_, name_end_)) On 2016/06/28 14:54:00, mmenke wrote: > ...
4 years, 5 months ago (2016-06-28 15:24:42 UTC) #6
mmenke
Still LGTM https://codereview.chromium.org/2101963002/diff/1/net/http/http_util.cc File net/http/http_util.cc (right): https://codereview.chromium.org/2101963002/diff/1/net/http/http_util.cc#newcode913 net/http/http_util.cc:913: if (!IsToken(name_begin_, name_end_)) On 2016/06/28 15:24:42, robwu ...
4 years, 5 months ago (2016-06-28 15:26:17 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2101963002/20001
4 years, 5 months ago (2016-06-28 15:53:52 UTC) #9
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 5 months ago (2016-06-28 17:34:00 UTC) #11
commit-bot: I haz the power
4 years, 5 months ago (2016-06-28 17:35:34 UTC) #13
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/78f29ac0214e16bdcc6eaa17fa4a5a84882bb7a8
Cr-Commit-Position: refs/heads/master@{#402498}

Powered by Google App Engine
This is Rietveld 408576698