aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortravis%sedsystems.ca <>2005-02-01 03:26:00 +0000
committertravis%sedsystems.ca <>2005-02-01 03:26:00 +0000
commit5ddb84da8800728b887f2497a205fad01c44be8a (patch)
treefe0142c706d425c17148cb2f634461e285f247c7 /checksetup.pl
parentBug 81642 : "Split bug / Clone bug": Enter new bug with prefilled fields (diff)
downloadbugzilla-5ddb84da8800728b887f2497a205fad01c44be8a.tar.gz
bugzilla-5ddb84da8800728b887f2497a205fad01c44be8a.tar.bz2
bugzilla-5ddb84da8800728b887f2497a205fad01c44be8a.zip
Bug 278792 : Move Crypt() to Bugzilla::Auth
Patch by Max Kanat-Alexander <mkanat@kerio.com> r=vladd a=justdave
Diffstat (limited to 'checksetup.pl')
-rwxr-xr-xchecksetup.pl14
1 files changed, 11 insertions, 3 deletions
diff --git a/checksetup.pl b/checksetup.pl
index 6bbedaaea..37f96df0a 100755
--- a/checksetup.pl
+++ b/checksetup.pl
@@ -1464,6 +1464,14 @@ if ($^O !~ /MSWin32/i) {
# The only use for loading globals.pl is for Crypt(), which should at some
# point probably be factored out into Bugzilla::Auth::*
+# XXX - bug 278792: Crypt has been moved to Bugzilla::Auth::bz_crypt.
+# This section is probably no longer needed, but we need to make sure
+# that things still work if we remove globals.pl. So that's for later.
+
+# It's safe to use Bugzilla::Auth here because parameters have now been
+# defined.
+use Bugzilla::Auth;
+
# globals.pl clears the PATH, but File::Find uses Cwd::cwd() instead of
# Cwd::getcwd(), which we need to do because `pwd` isn't in the path - see
# http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2001-09/msg00115.html
@@ -2776,7 +2784,7 @@ if (GetFieldDef('bugs', 'long_desc')) {
"(login_name, cryptpassword," .
" disabledtext) VALUES (" .
$dbh->quote($name) .
- ", " . $dbh->quote(Crypt('okthen')) . ", " .
+ ", " . $dbh->quote(bz_crypt('okthen')) . ", " .
"'Account created only to maintain database integrity')");
$s2 = $dbh->prepare("SELECT LAST_INSERT_ID()");
$s2->execute();
@@ -3200,7 +3208,7 @@ ENDTEXT
print "Fixing password #1... ";
while (my ($userid, $password) = $sth->fetchrow_array()) {
- my $cryptpassword = $dbh->quote(Crypt($password));
+ my $cryptpassword = $dbh->quote(bz_crypt($password));
$dbh->do("UPDATE profiles SET cryptpassword = $cryptpassword WHERE userid = $userid");
++$i;
# Let the user know where we are at every 500 records.
@@ -4474,7 +4482,7 @@ if ($sth->rows == 0) {
}
# Crypt the administrator's password
- my $cryptedpassword = Crypt($pass1);
+ my $cryptedpassword = bz_crypt($pass1);
if ($^O !~ /MSWin32/i) {
system("stty","echo"); # re-enable input echoing