phpass在身份验证失败从某些phpBB3的密码? [英] phpass fails on Authentication on certain passwords from phpBB3?

查看:365
本文介绍了phpass在身份验证失败从某些phpBB3的密码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

无论使用phpass测试程序 http://www.openwall.com/ phpass / phpass-0.3.tar.gz 或Python-phpass,并使用 C *?| Y [JKQ%GF 作为明文密码,和 $ p $ 9kS6tD8tVxajypvJ5837.bt2emepD8 / 作为哈希值,这样做的:

Using either the phpass test program http://www.openwall.com/phpass/phpass-0.3.tar.gz , or python-phpass, and using C?*|Y[j"KQ'%gf for the plain text password, and $P$9kS6tD8tVxajypvJ5837.bt2emepD8/ as the hash, doing:

<?php
#
# This is a test program for the portable PHP password hashing framework.
#
# Written by Solar Designer and placed in the public domain.
# See PasswordHash.php for more information.
#

require 'PasswordHash.php';

header('Content-type: text/plain');
$t_hasher = new PasswordHash(8, FALSE);
$correct2 = 'C?*|Y[j"KQ\'%gf';
$hash2 = '$P$9kS6tD8tVxajypvJ5837.bt2emepD8/';
print 'Hash: [' . $hash2 . "]\n";
print 'correct: [' . $correct2 . "]\n";

$check = $t_hasher->CheckPassword($correct2, $hash2);
if ($check)
    {
    print "Check IF THIS WORKScorrect: '" . $check . "' (should be '1')\n";
    }
else
    {
    print "IT FAILED!!!!!!!!\n\n\n";
    }
?>

哈希是从。中文(3.0.10),当我提供该密码。中文,它的确实的正常工作。

。中文应该是使用phpass本身,做$ H $,而不是$ P $。

phpBB3 is supposed to be using phpass itself, doing $H$ instead of $P$.

在phpBB3的数据库条目这个例子是:

The database entry in phpBB3 for this example is:

qlc4pi000000\";0;\"127.0.0.1\";1351902499;\"testpass\";\"testpass\";\"$H$9kS6tD8tVxajypvJ5837.bt2emepD8/\";1351902499;0;\"tp@inva.lid.com\";266402289712;\"''\";1351902544;1351902499;0;\"''\";\"''\";0;0;0;0;0;0;0;\"en\";0.00;0;\"D个月天,Y G:我a\";2;0;\"''\";0;0;0;0;-3;0;0;\"t\";\"d\";0;\"t\";\"a\";0;1;0;1;1;1;1;230271;\"''\";0;0;0;\"''\";\"''\";\"''\";\"''\";\"''\";\"''\";\"''\";\"''\";\"''\";\"''\";\"''\";\"''\";\"''\";\"''\";\"bf4ae169a5a21313\";1;0;0

qlc4pi000000";0;"127.0.0.1";1351902499;"testpass";"testpass";"$H$9kS6tD8tVxajypvJ5837.bt2emepD8/";1351902499;0;"tp@inva.lid.com";266402289712;"''";1351902544;1351902499;0;"''";"''";0;0;0;0;0;0;0;"en";0.00;0;"D M d, Y g:i a";2;0;"''";0;0;0;0;-3;0;0;"t";"d";0;"t";"a";0;1;0;1;1;1;1;230271;"''";0;0;0;"''";"''";"''";"''";"''";"''";"''";"''";"''";"''";"''";"''";"''";"''";"bf4ae169a5a21313";1;0;0

在使用。中文的明文密码可以是[C * | Y [JKQ'%GF]和散列(从phpBB3的格式转换为[$ P $ 9kS6tD8tVxajypvJ5837.bt2emepD8 /](包括密码和放大器;哈希是之间的[])

The plain text password used in phpBB3 is [C?*|Y[j"KQ'%gf] and the hash (converted from phpBB3 format is [$P$9kS6tD8tVxajypvJ5837.bt2emepD8/] (both password & hash are between the [])

任何人都可以阐明这是怎么回事一些光,为什么这并不phpass工作?
这是相同的机器,该论坛是上,并再次,它的。中文论坛的工作,这样我就可以登录罚款。它只是我不能phpass当我直接访问。中文数据库进行身份验证外。它不会对其他帐户的工作,虽然,它只是某些帐户失败的。

Can anyone shed some light on what is going on, and why this doesn't work with phpass ? This is on the same machine that the forums are on, and again, it does work on the phpBB3 forums, so I can login fine. It just I can't authenticate with phpass externally when I access the phpBB3 database directly. It does work on other accounts though, it is only certain accounts it fails on.

推荐答案

原来的问题是,phpBB3的转换使用HTML逃生codeS的密码。

Turns out the issue is, phpBB3 converts the password to use html escape codes.

现在,一旦密码被转换,它存储在phpBB3的哈希相匹配。

Now, once the password is converted, it matches the hash stored in phpBB3.

这篇关于phpass在身份验证失败从某些phpBB3的密码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆