diff options
author | justdave%syndicomm.com <> | 2001-07-11 14:29:16 +0200 |
---|---|---|
committer | justdave%syndicomm.com <> | 2001-07-11 14:29:16 +0200 |
commit | 022265211b1a3b3dad3fcf679756392c3eb6a285 (patch) | |
tree | 79c99d0bea86b527395b4aac32a37eef739c67dc /sanitycheck.cgi | |
parent | f208e298e2ac9836c8138449a0691f6deb850c4a (diff) | |
download | bugzilla-022265211b1a3b3dad3fcf679756392c3eb6a285.tar.gz bugzilla-022265211b1a3b3dad3fcf679756392c3eb6a285.tar.xz |
Fix for bug 77473, bug 74032, and bug 85472: Passwords are no longer stored in plaintext in the database. Passwords are no longer encrypted with MySQL's ENCRYPT() function (because it doesn't work on some installs), but with Perl's crypt() function. The crypt-related routines now properly deal with salts so that they work on systems that use methods other than UNIX crypt to crypt the passwords (such as MD5). Checksetup.pl will walk through your database and re-crypt everyone's passwords based on the plaintext password entry, then drop the plaintext password column. As a consequence of no longer having a plaintext password, it is no longer possible to email someone their password, so the login screen has been changed to request a password reset instead. The user is emailed a temporary identifying token, with a link back to Bugzilla. They click on the link or paste it into their browser and Bugzilla allows them to change their password.
Patch by Myk Melez <myk@mozilla.org>
r= justdave@syndicomm.com, jake@acutex.net
Diffstat (limited to 'sanitycheck.cgi')
-rwxr-xr-x | sanitycheck.cgi | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/sanitycheck.cgi b/sanitycheck.cgi index bc3b823c7..c8f628e58 100755 --- a/sanitycheck.cgi +++ b/sanitycheck.cgi @@ -165,25 +165,6 @@ CrossCheck("profiles", "userid", ["components", "initialowner", "value"], ["components", "initialqacontact", "value", ["0"]]); -Status("Checking passwords"); -SendSQL("SELECT COUNT(*) FROM profiles WHERE cryptpassword != ENCRYPT(password, left(cryptpassword, 2))"); -my $count = FetchOneColumn(); -if ($count) { - Alert("$count entries have problems in their crypted password."); - if ($::FORM{'rebuildpasswords'}) { - Status("Rebuilding passwords"); - SendSQL("UPDATE profiles - SET cryptpassword = ENCRYPT(password, - left(cryptpassword, 2)) - WHERE cryptpassword != ENCRYPT(password, - left(cryptpassword, 2))"); - Status("Passwords have been rebuilt."); - } else { - print qq{<a href="sanitycheck.cgi?rebuildpasswords=1">Click here to rebuild the crypted passwords</a><p>\n}; - } -} - - Status("Checking groups"); SendSQL("select bit from groups where bit != pow(2, round(log(bit) / log(2)))"); |