summaryrefslogtreecommitdiffstats
path: root/net/http/http_auth_handler_negotiate_win.cc
diff options
context:
space:
mode:
authorcbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-26 21:07:45 +0000
committercbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-26 21:07:45 +0000
commiteb3cac713b9d8d6f1f12f55df9e05c56ba64af41 (patch)
tree7c4b924b753067f1800ea48ae1f3a47b587aa3bf /net/http/http_auth_handler_negotiate_win.cc
parent71bc0d0d454034744c1657e24edae9d31b569d66 (diff)
downloadchromium_src-eb3cac713b9d8d6f1f12f55df9e05c56ba64af41.zip
chromium_src-eb3cac713b9d8d6f1f12f55df9e05c56ba64af41.tar.gz
chromium_src-eb3cac713b9d8d6f1f12f55df9e05c56ba64af41.tar.bz2
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
Diffstat (limited to 'net/http/http_auth_handler_negotiate_win.cc')
-rw-r--r--net/http/http_auth_handler_negotiate_win.cc10
1 files changed, 10 insertions, 0 deletions
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<HttpAuthHandler>* 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_);