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

Unified Diff: net/http/http_auth_handler_ntlm.cc

Issue 3150033: Fail rather than crash if username+password are unspecified for NTLM on Linux+OSX. (Closed)
Patch Set: Using MISSING_AUTH_CREDENTIALS Created 10 years, 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_auth_handler_ntlm.cc
diff --git a/net/http/http_auth_handler_ntlm.cc b/net/http/http_auth_handler_ntlm.cc
index 83a8c9ab90914daf2ac1b781f11823e886448fa1..3a7d25e1ca17fb190892e7bd74c64c3da715bc82 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.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698