MOO-cows Mailing List Archive

[Prev][Next][Index][Thread]

Re: crypt()ic problem



Followup to:  <Pine.BSF.3.91.960610141621.28645C-100000@srv1.thuntek.net>
By author:    "Jamal A. Wills" <jwills@thuntek.net>
In newsgroup: local.moo
> 
> I think this system has a slightly nonstandard form of crypt().  If I 
> change candidate.password[1..2] to candidate.password[4..5] I think it 
> should work, but I wanted to check with someone more familier with the 
> language first (especially since this would make the code incompatable 
> with other servers).
> 

The [1..2] part is actually bogus, it just happens to work on standard
UNIX crypt().

The correct form is actually:

if ( crypt(guess, password) == crypt(password, password) ) then
...


where "guess" is what the user typed in and password is the stored
encrypted password.

	-hpa
-- 
PGP public key available - finger hpa@zytor.com
"The earth is but one country, and mankind its citizens."  --  Bahá'u'lláh
Just Say No to Morden * Save Babylon 5: http://www.babylon5.com/cmp/support/
The cat is out of the bag - Linux 2.0 is available!


References:

Home | Subject Index | Thread Index