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

Issue 15688012: net: don't process truncated headers. (Closed)

Created:
7 years, 6 months ago by agl
Modified:
7 years, 6 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, mmenke
Visibility:
Public.

Description

net: don't process truncated headers on HTTPS connections. This change causes us to not process any headers unless they are correctly terminated with a \r\n\r\n sequence. BUG=244260 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=202927

Patch Set 1 #

Patch Set 2 : Fix skew between spdy3 and spdy2 changes. #

Patch Set 3 : Only enforce this for HTTPS URLs. #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+142 lines, -15 lines) Patch
M net/base/net_error_list.h View 1 chunk +3 lines, -0 lines 2 comments Download
M net/http/http_proxy_client_socket_pool_spdy2_unittest.cc View 1 chunk +7 lines, -1 line 0 comments Download
M net/http/http_proxy_client_socket_pool_spdy3_unittest.cc View 1 chunk +7 lines, -1 line 0 comments Download
M net/http/http_stream_parser.cc View 1 2 1 chunk +18 lines, -13 lines 6 comments Download
M net/http/http_stream_parser_unittest.cc View 1 2 1 chunk +107 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (0 generated)
Ryan Hamilton
lgtm
7 years, 6 months ago (2013-05-28 21:38:18 UTC) #1
agl
PTAL. This change has been updated to only affect HTTPS.
7 years, 6 months ago (2013-05-28 23:16:36 UTC) #2
Ryan Hamilton
lgtm
7 years, 6 months ago (2013-05-29 02:39:30 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/agl@chromium.org/15688012/20001
7 years, 6 months ago (2013-05-29 14:50:26 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/agl@chromium.org/15688012/20001
7 years, 6 months ago (2013-05-29 14:50:49 UTC) #5
commit-bot: I haz the power
Step "update" is always a major failure. Look at the try server FAQ for more ...
7 years, 6 months ago (2013-05-29 15:52:21 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/agl@chromium.org/15688012/20001
7 years, 6 months ago (2013-05-29 16:08:14 UTC) #7
commit-bot: I haz the power
Change committed as 202927
7 years, 6 months ago (2013-05-29 19:06:54 UTC) #8
Ryan Sleevi
https://chromiumcodereview.appspot.com/15688012/diff/20001/net/http/http_stream_parser.cc File net/http/http_stream_parser.cc (right): https://chromiumcodereview.appspot.com/15688012/diff/20001/net/http/http_stream_parser.cc#newcode549 net/http/http_stream_parser.cc:549: } else if (request_->url.SchemeIs("https")) { Seems like we should ...
7 years, 6 months ago (2013-05-29 19:59:32 UTC) #9
wtc
Drive-by review comments: I didn't review the unit tests. https://codereview.chromium.org/15688012/diff/20001/net/base/net_error_list.h File net/base/net_error_list.h (right): https://codereview.chromium.org/15688012/diff/20001/net/base/net_error_list.h#newcode540 net/base/net_error_list.h:540: ...
7 years, 6 months ago (2013-05-30 00:38:30 UTC) #10
agl
Will do follow up CL if someone wants to say that all SchemeIs("https") in the ...
7 years, 6 months ago (2013-06-03 18:18:28 UTC) #11
wtc
7 years, 6 months ago (2013-06-03 18:36:47 UTC) #12
Message was sent while issue was closed.
https://chromiumcodereview.appspot.com/15688012/diff/20001/net/http/http_stre...
File net/http/http_stream_parser.cc (right):

https://chromiumcodereview.appspot.com/15688012/diff/20001/net/http/http_stre...
net/http/http_stream_parser.cc:549: } else if (request_->url.SchemeIs("https"))
{

On 2013/06/03 18:18:29, agl wrote:
>
> r.e. SchemeIsSecure - should the other uses of SchemeIs("https") in this file
be
> changed too? (I'm guessing yes, but wanted to check.)

It occurred to me that this file, http_stream_parser.cc, is probably only used
for the "http" and "https" schemes. If so, then SchemeIs("https") vs.
SchemeIsSecure()
is just a cosmetic issue.

SchemeIsSecure is defined as:

  // If the scheme indicates a secure connection
  bool SchemeIsSecure() const {
    return SchemeIs("https") || SchemeIs("wss") ||
        (SchemeIsFileSystem() && inner_url() && inner_url()->SchemeIsSecure());
  }

So there is also a SchemeIsFileSystem() test, which I don't fully understand.

Since this file isn't using SchemeIsSecure, I now think it is fine to just
use SchemeIs("https") here.

Powered by Google App Engine
This is Rietveld 408576698