]> granicus.if.org Git - apache/commitdiff
cut password at the first colon.
authorAndre Malo <nd@apache.org>
Wed, 1 Jan 2003 03:23:11 +0000 (03:23 +0000)
committerAndre Malo <nd@apache.org>
Wed, 1 Jan 2003 03:23:11 +0000 (03:23 +0000)
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

modules/aaa/mod_authn_dbm.c

index 19697ef11428c92c4f5518578ccbbefa1be440ca..38d562a0c02041724b69a7b316ad8bed0a736ab5 100644 (file)
@@ -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) {