summaryrefslogtreecommitdiff
path: root/modules/aaa/mod_auth_digest.c
diff options
context:
space:
mode:
authorArno Töll <arno@debian.org>2013-12-23 23:50:09 -1100
committerArno Töll <arno@debian.org>2013-12-23 23:50:09 -1100
commit86d5cc79d9d6750da8771fdb0c9ab22c19b8ad45 (patch)
tree5037da70bf37c0ee93f0ea09f054bdfb278befe0 /modules/aaa/mod_auth_digest.c
parent4a336a5b117419c33c29eadd6409c69df78cd586 (diff)
downloadapache2-86d5cc79d9d6750da8771fdb0c9ab22c19b8ad45.tar.gz
Imported Upstream version 2.4.7upstream/2.4.7
Diffstat (limited to 'modules/aaa/mod_auth_digest.c')
-rw-r--r--modules/aaa/mod_auth_digest.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/modules/aaa/mod_auth_digest.c b/modules/aaa/mod_auth_digest.c
index 987e5b5b..dcf1e15b 100644
--- a/modules/aaa/mod_auth_digest.c
+++ b/modules/aaa/mod_auth_digest.c
@@ -1811,7 +1811,15 @@ static int authenticate_digest_user(request_rec *r)
return HTTP_UNAUTHORIZED;
}
- if (strcmp(resp->realm, conf->realm)) {
+ if (!conf->realm) {
+ ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(02533)
+ "realm mismatch - got `%s' but no realm specified",
+ resp->realm);
+ note_digest_auth_failure(r, conf, resp, 0);
+ return HTTP_UNAUTHORIZED;
+ }
+
+ if (!resp->realm || strcmp(resp->realm, conf->realm)) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01788)
"realm mismatch - got `%s' but expected `%s'",
resp->realm, conf->realm);