From: Amos Jeffries Date: Sun, 28 Aug 2011 16:40:37 +0000 (-0600) Subject: Useful error message from NCSA when DES blocked. X-Git-Tag: take08~35^2~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2d2772b0667ca8c718aee7b0d28e5b0e17175919;p=thirdparty%2Fsquid.git Useful error message from NCSA when DES blocked. --- diff --git a/helpers/basic_auth/NCSA/basic_ncsa_auth.cc b/helpers/basic_auth/NCSA/basic_ncsa_auth.cc index e98e7ece20..d624306a8a 100644 --- a/helpers/basic_auth/NCSA/basic_ncsa_auth.cc +++ b/helpers/basic_auth/NCSA/basic_ncsa_auth.cc @@ -143,6 +143,9 @@ main(int argc, char **argv) } else if (strlen(passwd) <= 8 && strcmp(u->passwd, (char *) crypt(passwd, u->passwd)) == 0) { // Bug 3107: crypt() DES functionality silently truncates long passwords. SEND_OK(""); + } else if (strlen(passwd) > 8 && strcmp(u->passwd, (char *) crypt(passwd, u->passwd)) == 0) { + // Bug 3107: crypt() DES functionality silently truncates long passwords. + SEND_ERR("Password too long. Only 8 characters accepted."); #endif } else if (strcmp(u->passwd, (char *) crypt_md5(passwd, u->passwd)) == 0) { SEND_OK("");