From eb3cac713b9d8d6f1f12f55df9e05c56ba64af41 Mon Sep 17 00:00:00 2001 From: "cbentzel@chromium.org" Date: Fri, 26 Feb 2010 21:07:45 +0000 Subject: Added HttpAuthFilter. Original patch by ahendrickson@chromium.org (http://codereview.chromium.org/646068) BUG=29596 TEST=net_unittests.exe --gtest_filter="*HttpAuthFilterTest*" Review URL: http://codereview.chromium.org/660193 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40157 0039d316-1c4b-4281-b951-d872f2087c98 --- net/http/http_auth_handler_negotiate_win.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'net/http/http_auth_handler_negotiate_win.cc') diff --git a/net/http/http_auth_handler_negotiate_win.cc b/net/http/http_auth_handler_negotiate_win.cc index ffa48ef9..c09beb0 100644 --- a/net/http/http_auth_handler_negotiate_win.cc +++ b/net/http/http_auth_handler_negotiate_win.cc @@ -4,7 +4,9 @@ #include "net/http/http_auth_handler_negotiate.h" +#include "base/logging.h" #include "net/base/net_errors.h" +#include "net/http/http_auth_filter.h" namespace net { @@ -92,6 +94,14 @@ int HttpAuthHandlerNegotiate::Factory::CreateAuthHandler( scoped_refptr* handler) { if (is_unsupported_) return ERR_UNSUPPORTED_AUTH_SCHEME; + if (filter() && !filter()->IsValid(origin, target)) { + LOG(INFO) << "URL " << origin + << "fails filter validation for authentication method " + << "Negotiate"; + + return ERR_INVALID_AUTH_CREDENTIALS; + } + if (max_token_length_ == 0) { int rv = DetermineMaxTokenLength(sspi_library_, NEGOSSP_NAME, &max_token_length_); -- cgit v1.1