PDA

View Full Version : [Bug] ioFTPD PHP user_query bad password


St0rm
05-01-2004, 08:27 AM
There seems to be a problem with the io_user_query() function:

$uid = io_user_id("ioFTPD");
$password = "ioFTPD";
$userfile = io_user_open($uid);
$usermask = io_user_mask_init(UINFO_PASSWORD);
$userarray = io_user_query($userfile, $usermask);
print($userarray[0] . "<br />" . io_sha1($password));

This code should print 2 passwords that are exactly the same, but for some reason it doesn't. The output looks like this:

6045ff757913ff59ff10ffff4f2746ff4d4d6b32
6045b1757913f659b210fceb4f2746d74d4d6b32

The second password is the correct one, which matches the password in the corresponding user file. The first password matches nothing (not even a password from the other userfiles). Am I missing something here or is it a bug in one of the functions?

Mouton
05-01-2004, 09:23 AM
Looks like a bug to me. Every time a hex is > 9F (I guess), it's FF in the wrong password...
60 45 b1 75 79 13 f6 59 b2 10 fc eb 4f 27 46 d7 4d 4d 6b 32
60 45 ff 75 79 13 ff 59 ff 10 ff ff 4f 27 46 ff 4d 4d 6b 32