Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Perl crypt() - MAJOR security bug???

1 view
Skip to first unread message

Douglas Garstang

unread,
Jun 26, 1999, 3:00:00 AM6/26/99
to
I've come across something with the perl crypt() function that I just just
understand!

Take the example below....

$pwd = (getpwnam("john"))[1];
$word="password";
$salt = substr($pwd, 0, 2);

if (crypt($word, $salt) ne $pwd) {
die "Sorry...\n";
} else {
print "ok\n";
}

Assuming john's password IS 'password' this all works fine.

If I change the password to 'passwordX'... crypt() STILL says it is fine.

What on EARTH????

Replies to dgar...@nsw.bigpond.net.au

Thanks


0 new messages