From: Stefan Fritsch Date: Sat, 24 Oct 2009 18:37:28 +0000 (+0000) Subject: Fix brown-paper-bag bug. X-Git-Tag: 2.3.3~134 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7dc061ebd1f293780194941b2ac5a171487e7987;p=apache Fix brown-paper-bag bug. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@829431 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/support/htpasswd.c b/support/htpasswd.c index 20c616d382..98865c434e 100644 --- a/support/htpasswd.c +++ b/support/htpasswd.c @@ -222,7 +222,7 @@ static int mkrecord(char *user, char *record, apr_size_t rlen, char *passwd, if (strlen(pw) > 8) { char *truncpw = strdup(pw); truncpw[8] = '\0'; - if (!strcmp(cpw, crypt(pw, salt))) { + if (!strcmp(cpw, crypt(truncpw, salt))) { apr_file_printf(errfile, "Warning: Password truncated to 8 characters " "by CRYPT algorithm." NL); }