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

Unified Diff: net/http/http_auth_controller.cc

Issue 10446024: Revert 138890 - Merge 138264 - Re-enable embedded identities in URLs for HTTP authentication. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1132/src/
Patch Set: Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/http/http_network_transaction_spdy2_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_auth_controller.cc
===================================================================
--- net/http/http_auth_controller.cc (revision 138902)
+++ net/http/http_auth_controller.cc (working copy)
@@ -450,21 +450,17 @@
DCHECK(handler_.get());
DCHECK(identity_.invalid);
- // Try to use the username:password encoded into the URL first.
+ // Do not try to use the username:password encoded into the URL. At worst,
+ // this represents a session fixation attack against basic auth, and as it
+ // turns out, IE hasn't supported this for years. If a caller really wants
+ // to use embedded identities, the can add an URLRequest::Delegate that
+ // inspects the URL and supplies the username/password at OnAuthRequired()
+ // time. Past data shows this is used extremely infrequently in web pages,
+ // but continue to collect this data.
if (target_ == HttpAuth::AUTH_SERVER && auth_url_.has_username() &&
!embedded_identity_used_) {
- identity_.source = HttpAuth::IDENT_SRC_URL;
- identity_.invalid = false;
- // Extract the username:password from the URL.
- string16 username;
- string16 password;
- GetIdentityFromURL(auth_url_, &username, &password);
- identity_.credentials.Set(username, password);
embedded_identity_used_ = true;
- // TODO(eroman): If the password is blank, should we also try combining
- // with a password from the cache?
UMA_HISTOGRAM_BOOLEAN("net.HttpIdentSrcURL", true);
- return true;
}
// Check the auth cache for a realm entry.
« no previous file with comments | « no previous file | net/http/http_network_transaction_spdy2_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698