MySql Encrypt() Function Returns NULL for WinNT

RESOLVED FIXED in Bugzilla 2.12



18 years ago
5 years ago


(Reporter: Kym Farrell, Assigned: Tara Hernandez)


Bugzilla 2.12
Windows NT


(Whiteboard: 2.16)



18 years ago
Testing Bugzilla under WinNT 4.0 Workstation, with ActiveState Perl 5.005_03.
Using MySQL-Shareware for Win95/98. Version 2.32.22-shareware-debug.

In library within subroutine "confirm_login", the use of MySql Encrypt 
function for password encryption fails. MySQL returns NULL.

Also occurs in library within subroutine "InsertNewUser". 

Required Changes to workaround;

-------- ----------
#original        SendSQL("SELECT encrypt(" . SqlQuote($enteredpwd) . ", " .
#original                SqlQuote(substr($realcryptpwd, 0, 2)) . ")");
#original        my $enteredcryptpwd = FetchOneColumn();

    my $enteredcryptpwd = crypt($enteredpwd, substr($realcryptpwd, 0, 2));

-------- ----------
#original    SendSQL("insert into profiles (login_name, realname, password,
             cryptpassword, groupset) values ($username, $realname, '$password', 
             encrypt('$password'), $groupset)");
             SendSQL("insert into profiles (login_name, realname, password,
             cryptpassword, groupset) values ($username, $realname,
             '$password','". crypt($password,$password)."', $groupset)");

Comment 1

18 years ago is the new owner of Bugzilla and Bonsai.  (For details,
see my posting in netscape.public.mozilla.webtools,
news:// .)
Assignee: terry → tara
This bug has not been touched for more than nine months. In most cases, that 
means it has "slipped through the net". Please could the owner take a moment to 
add a comment to the bug with current status, and/or close it.

Thank you :-)

There are changes present so I'll put this up for 2.14.
QA Contact: matty
Whiteboard: 2.14


17 years ago
Depends on: 17566
Whiteboard: 2.14 → 2.16
moving to real milestones...
Target Milestone: --- → Bugzilla 2.16

Comment 5

17 years ago
This was resolved with the documentation update in bug 17566, detailed Windows
NT installation instructions.  I will be checking the Bugzilla Guide into CVS
tonight or tomorrow morning, which includes the workaround for Windows NT
installations that do not support the crypt() function.
Last Resolved: 17 years ago
Resolution: --- → FIXED
In search of accurate queries....  (sorry for the spam)
Target Milestone: Bugzilla 2.16 → Bugzilla 2.12
The current entry in the Bugzilla Guide reads:

"* Modify and to remove the word "encrypt". 

    Note: I'm not sure this is all that is involved to remove crypt. Any NT 
Bugzilla hackers want to pipe up?"

Is this all that's needed? CCing barnboy.


Comment 8

17 years ago
I reported this bug, and just re-ported 2.11 to our NT box. So heres the list 
of locations to replace SQL Encrypt with perl crypt...

*) Acutally uses the "correct" crypt (perl version)
*) sub confirm_login: needs SQL Encrypt replaced by Perl crypt (line ~680)
*) needs SQL encrypt replaced where it stores the initial Admin password (line 
*) needs SQL encrypt replaced where a "fixup" is done for existing instalations  
(line  ~1700)

*) In the "#Add the new user" section, needs SQL encrypt replaced at line ~484
*) Also in the update password section line ~820
*) sub InsertNewUser needs SQL encrypt replaced (line ~606)
*) Uses SQL Encrypt for password consistency checking (line ~160)
*) around lines ~140 & 150 uses SQL encrypt for setting verifying passwords.
Moving closed bugs to Bugzilla product
Component: Bugzilla → Bugzilla-General
Product: Webtools → Bugzilla
Version: other → unspecified
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.