summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndré Malo <nd@apache.org>2003-01-01 04:23:11 +0100
committerAndré Malo <nd@apache.org>2003-01-01 04:23:11 +0100
commit219df484cdfb2416ed5fe5dc5b77ab0d60a1a77a (patch)
treebf18c73bf228628b71bf8aacc482499c6a4d5522
parentallow the space in "xy directive" (directivesynopsis heading) (diff)
downloadapache2-219df484cdfb2416ed5fe5dc5b77ab0d60a1a77a.tar.xz
apache2-219df484cdfb2416ed5fe5dc5b77ab0d60a1a77a.zip
cut password at the first colon.
This readds the ability to store password and group information within the same dbm file git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98142 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--modules/aaa/mod_authn_dbm.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/aaa/mod_authn_dbm.c b/modules/aaa/mod_authn_dbm.c
index 19697ef114..38d562a0c0 100644
--- a/modules/aaa/mod_authn_dbm.c
+++ b/modules/aaa/mod_authn_dbm.c
@@ -156,6 +156,7 @@ static authn_status check_dbm_pw(request_rec *r, const char *user,
apr_datum_t dbm_pw;
apr_status_t rv;
char *dbm_password = NULL;
+ char *colon_pw;
rv = fetch_dbm(conf->dbmtype, conf->pwfile, user, &dbm_pw, r->pool);
@@ -174,6 +175,11 @@ static authn_status check_dbm_pw(request_rec *r, const char *user,
return AUTH_USER_NOT_FOUND;
}
+ colon_pw = strchr(dbm_password, ':');
+ if (colon_pw) {
+ *colon_pw = '\0';
+ }
+
rv = apr_password_validate(password, dbm_password);
if (rv != APR_SUCCESS) {