summaryrefslogtreecommitdiff
path: root/modules/aaa/mod_auth_digest.c
diff options
context:
space:
mode:
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);