From ca8760339069c50ccbdcf3d92e416f7d1522adf8 Mon Sep 17 00:00:00 2001 From: "terry%mozilla.org" <> Date: Tue, 18 Jan 2000 22:40:18 +0000 Subject: Stop ever using perl's crypt() function; only use mysql's. (Using both was causing corruption on about 1 in 40 passwords.) --- editusers.cgi | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'editusers.cgi') diff --git a/editusers.cgi b/editusers.cgi index ccb108e79..5b5d7e526 100755 --- a/editusers.cgi +++ b/editusers.cgi @@ -277,21 +277,13 @@ if ($action eq 'new') { } - sub x { - my $sc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789./"; - return substr($sc, int (rand () * 100000) % (length ($sc) + 1), 1); - } - - my $salt = x() . x(); - my $cryptpassword = crypt($password, $salt); - # Add the new user SendSQL("INSERT INTO profiles ( " . "login_name, password, cryptpassword, realname, groupset" . " ) VALUES ( " . SqlQuote($user) . "," . SqlQuote($password) . "," . - SqlQuote($cryptpassword) . "," . + "encrypt(" . SqlQuote($password) . ")," . SqlQuote($realname) . "," . $bits . ")" ); -- cgit v1.2.3-24-g4f1b