summaryrefslogtreecommitdiffstats
path: root/support/htpasswd.c
diff options
context:
space:
mode:
authorStefan Fritsch <sf@apache.org>2009-10-23 20:13:46 +0200
committerStefan Fritsch <sf@apache.org>2009-10-23 20:13:46 +0200
commit0a7227e73205de6e59b864c6207b755431dd1195 (patch)
tree1c5c245cc40a8b4c19d68c98bb0642946ab8a771 /support/htpasswd.c
parentNew .fr translations (diff)
downloadapache2-0a7227e73205de6e59b864c6207b755431dd1195.tar.xz
apache2-0a7227e73205de6e59b864c6207b755431dd1195.zip
Print a warning if a password is truncated by crypt.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@829162 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--support/htpasswd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/support/htpasswd.c b/support/htpasswd.c
index 82069f5cac..c8cac25611 100644
--- a/support/htpasswd.c
+++ b/support/htpasswd.c
@@ -186,6 +186,10 @@ static int mkrecord(char *user, char *record, apr_size_t rlen, char *passwd,
pw = pwin;
memset(pwv, '\0', sizeof(pwin));
}
+ if (alg == ALG_CRYPT && strlen(pw) > 8) {
+ apr_file_printf(errfile, "Warning: Password truncated to 8 characters "
+ "by CRYPT algorithm." NL);
+ }
switch (alg) {
case ALG_APSHA: