summaryrefslogtreecommitdiff
path: root/modules/aaa
diff options
context:
space:
mode:
authorPaul Querna <pquerna@apache.org>2005-05-26 20:34:21 +0000
committerPaul Querna <pquerna@apache.org>2005-05-26 20:34:21 +0000
commitdf86e987f785a760bfd777dac31be125a1d3fc59 (patch)
treedade05575a57266e584a3d0a254682d34218c984 /modules/aaa
parent4fc1adcc5e6f0f1b16e5ef75c809f3d75b001896 (diff)
downloadhttpd-df86e987f785a760bfd777dac31be125a1d3fc59.tar.gz
Fix segmentation fault in mod_auth_{basic,digest} when no provider is explicitly listed.
Reported by: Ben Collins-Sussman <sussman collab.net> git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@178674 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/aaa')
-rw-r--r--modules/aaa/mod_auth_basic.c3
-rw-r--r--modules/aaa/mod_auth_digest.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/modules/aaa/mod_auth_basic.c b/modules/aaa/mod_auth_basic.c
index b4b48a6f21..ee296a4491 100644
--- a/modules/aaa/mod_auth_basic.c
+++ b/modules/aaa/mod_auth_basic.c
@@ -232,12 +232,13 @@ static int authenticate_basic_user(request_rec *r)
auth_result = AUTH_GENERAL_ERROR;
break;
}
+ apr_table_setn(r->notes, AUTHN_PROVIDER_NAME_NOTE, AUTHN_DEFAULT_PROVIDER);
}
else {
provider = current_provider->provider;
+ apr_table_setn(r->notes, AUTHN_PROVIDER_NAME_NOTE, current_provider->provider_name);
}
- apr_table_setn(r->notes, AUTHN_PROVIDER_NAME_NOTE, current_provider->provider_name);
auth_result = provider->check_password(r, sent_user, sent_pw);
diff --git a/modules/aaa/mod_auth_digest.c b/modules/aaa/mod_auth_digest.c
index 7edf320183..9756ac2611 100644
--- a/modules/aaa/mod_auth_digest.c
+++ b/modules/aaa/mod_auth_digest.c
@@ -1353,12 +1353,13 @@ static authn_status get_hash(request_rec *r, const char *user,
auth_result = AUTH_GENERAL_ERROR;
break;
}
+ apr_table_setn(r->notes, AUTHN_PROVIDER_NAME_NOTE, AUTHN_DEFAULT_PROVIDER);
}
else {
provider = current_provider->provider;
+ apr_table_setn(r->notes, AUTHN_PROVIDER_NAME_NOTE, current_provider->provider_name);
}
- apr_table_setn(r->notes, AUTHN_PROVIDER_NAME_NOTE, current_provider->provider_name);
/* We expect the password to be md5 hash of user:realm:password */
auth_result = provider->get_realm_hash(r, user, conf->realm,