]> granicus.if.org Git - apache/commitdiff
Fix brown-paper-bag bug.
authorStefan Fritsch <sf@apache.org>
Sat, 24 Oct 2009 18:37:28 +0000 (18:37 +0000)
committerStefan Fritsch <sf@apache.org>
Sat, 24 Oct 2009 18:37:28 +0000 (18:37 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@829431 13f79535-47bb-0310-9956-ffa450edef68

support/htpasswd.c

index 20c616d38225723a88ab46ead75c43702ff1aae7..98865c434e8fcc0db024b42dd6d0a397bdb90978 100644 (file)
@@ -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);
             }