1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 05:50:42 +02:00

Merge branch 'develop' of https://github.com/phpbb/phpbb3 into feature/passwords

Conflicts:
	phpBB/includes/functions.php
This commit is contained in:
Marc Alexander
2013-10-03 10:04:59 +02:00
38 changed files with 388 additions and 337 deletions

View File

@@ -44,5 +44,13 @@ class phpbb_security_hash_test extends phpbb_test_case
$this->assertTrue(phpbb_check_hash('test', '$P$9isfrtKXWqrz8PvztXlL3.daw4U0zI1'));
$this->assertFalse(phpbb_check_hash('foo', '$H$9isfrtKXWqrz8PvztXlL3.daw4U0zI1'));
}
public function test_check_hash_with_large_input()
{
// 16 MB password, should be rejected quite fast
$start_time = time();
$this->assertFalse(phpbb_check_hash(str_repeat('a', 1024 * 1024 * 16), '$H$9isfrtKXWqrz8PvztXlL3.daw4U0zI1'));
$this->assertLessThanOrEqual(5, time() - $start_time);
}
}