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

Issue 982733002: SanitizeProxyAuth: Whitelist all hop-by-hop headers (Closed)

Created:
5 years, 9 months ago by Deprecated (see juliatuttle)
Modified:
5 years, 9 months ago
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

SanitizeProxyAuth: Whitelist all hop-by-hop headers We were discarding "Proxy-Authenticate: keep-alive" headers in HTTP/1.0 responses, which broke multi-step connection-level authentication methods for proxies that sent HTTP/1.0 responses. BUG=463937 Committed: https://crrev.com/34f63b55b51e8fc46ad86334783a665d5f487738 Cr-Commit-Position: refs/heads/master@{#319219}

Patch Set 1 #

Patch Set 2 : Also copy content-length header #

Patch Set 3 : Expect specified content-length in BasicAuthProxyKeepAlive test #

Total comments: 1

Patch Set 4 : Test proxy auth with keep-alive with both HTTP/1.0 and 1.1 responses #

Patch Set 5 : Split no-keep-alive tests as well #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+243 lines, -7 lines) Patch
M net/http/http_network_transaction_unittest.cc View 1 2 3 4 5 chunks +231 lines, -5 lines 0 comments Download
M net/http/proxy_client_socket.cc View 1 1 chunk +12 lines, -2 lines 3 comments Download

Messages

Total messages: 13 (6 generated)
Deprecated (see juliatuttle)
PTAL, cbentzel. FYI, asanka and rsleevi.
5 years, 9 months ago (2015-03-05 02:05:24 UTC) #3
cbentzel
LGTM rch was in initial review as well. https://codereview.chromium.org/982733002/diff/40001/net/http/proxy_client_socket.cc File net/http/proxy_client_socket.cc (right): https://codereview.chromium.org/982733002/diff/40001/net/http/proxy_client_socket.cc#newcode108 net/http/proxy_client_socket.cc:108: CopyHeaderValues(old_headers, ...
5 years, 9 months ago (2015-03-05 02:08:49 UTC) #5
Deprecated (see juliatuttle)
On 2015/03/05 02:08:49, cbentzel wrote: > LGTM > > rch was in initial review as ...
5 years, 9 months ago (2015-03-05 02:32:22 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/982733002/80001
5 years, 9 months ago (2015-03-05 02:37:01 UTC) #9
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years, 9 months ago (2015-03-05 04:33:11 UTC) #10
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/34f63b55b51e8fc46ad86334783a665d5f487738 Cr-Commit-Position: refs/heads/master@{#319219}
5 years, 9 months ago (2015-03-05 04:33:38 UTC) #11
wtc
5 years, 9 months ago (2015-03-06 02:22:41 UTC) #13
Message was sent while issue was closed.
Drive-by review comments: I suggest some improvements to comments.

https://codereview.chromium.org/982733002/diff/80001/net/http/proxy_client_so...
File net/http/proxy_client_socket.cc (right):

https://codereview.chromium.org/982733002/diff/80001/net/http/proxy_client_so...
net/http/proxy_client_socket.cc:99: // behavior.

The comment for ProxyClientSocket::SanitizeProxyAuth in proxy_client_socket.h
should be updated. In particular, that comment should say which headers (at
least give some representative examples) must be stripped and why (for security
reasons?).

https://codereview.chromium.org/982733002/diff/80001/net/http/proxy_client_so...
net/http/proxy_client_socket.cc:110: CopyHeaderValues(old_headers, new_headers,
"proxy-authenticate");

This list of headers looks very ad hoc to me. I'm curious how you determined
which headers must be copied. Some are obvious, such as "proxy-connection" and
"keep-alive", which are needed for keep-alive/persistent connections. Perhaps we
can group the headers, something like:

  // For keep-alive/persistent connections
  ... "connection");
  ... "proxy-connection");
  ... "keep-alive");

  // For chunked encoding or content length.
  ... "trailer");
  ... "transfer-encoding");
  ... "content-length");

  etc.

https://codereview.chromium.org/982733002/diff/80001/net/http/proxy_client_so...
net/http/proxy_client_socket.cc:129: "Connection: close\n"

Nit: it is inconsistent within this file whether the HTTP headers are spelled in
all lowercase or capitalized.

Powered by Google App Engine
This is Rietveld 408576698