diff options
author | cbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-24 18:51:40 +0000 |
---|---|---|
committer | cbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-24 18:51:40 +0000 |
commit | 32f36eaadb0ad4e14a197d6558d3b2e4bde8eb39 (patch) | |
tree | 37c250491dd551157ec095deee61f73857648b45 /net | |
parent | 4e53c2c13f1e4703ab836f02b7a1db1980438a7e (diff) | |
download | chromium_src-32f36eaadb0ad4e14a197d6558d3b2e4bde8eb39.zip chromium_src-32f36eaadb0ad4e14a197d6558d3b2e4bde8eb39.tar.gz chromium_src-32f36eaadb0ad4e14a197d6558d3b2e4bde8eb39.tar.bz2 |
Fail rather than crash if username+password are unspecified for NTLM on Linux+OSX.
This will be yanked out, but is being used to triage a bug.
BUG=50517
TEST=None
Review URL: http://codereview.chromium.org/3150033
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57211 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/http/http_auth_handler_ntlm.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/net/http/http_auth_handler_ntlm.cc b/net/http/http_auth_handler_ntlm.cc index 83a8c9a..3a7d25e 100644 --- a/net/http/http_auth_handler_ntlm.cc +++ b/net/http/http_auth_handler_ntlm.cc @@ -28,6 +28,11 @@ int HttpAuthHandlerNTLM::GenerateAuthTokenImpl( CreateSPN(origin_), auth_token); #else // !defined(NTLM_SSPI) + // TODO(cbentzel): Shouldn't be hitting this case. + if (!username || !password) { + LOG(ERROR) << "Username and password are expected to be non-NULL."; + return ERR_MISSING_AUTH_CREDENTIALS; + } // TODO(wtc): See if we can use char* instead of void* for in_buf and // out_buf. This change will need to propagate to GetNextToken, // GenerateType1Msg, and GenerateType3Msg, and perhaps further. |