From: André Malo Date: Wed, 1 Jan 2003 03:23:11 +0000 (+0000) Subject: cut password at the first colon. X-Git-Tag: pre_ajp_proxy~2348 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=219df484cdfb2416ed5fe5dc5b77ab0d60a1a77a;p=apache 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 --- 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) {