diff options
author | Andreas Fischer <bantu@phpbb.com> | 2013-09-28 15:02:44 +0200 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2013-09-28 15:02:44 +0200 |
commit | 02f9d179e541cf462e042774f6438263459926a3 (patch) | |
tree | eb80a3852453b64b1f80a636a7a0f85d2eb57188 /phpBB/includes | |
parent | 50f6af2a207dc18c1e76b08201a5c9ea640e921f (diff) | |
parent | 446ea9928d8373cf7695d3adda6d5ee30d5f94b4 (diff) | |
download | forums-02f9d179e541cf462e042774f6438263459926a3.tar forums-02f9d179e541cf462e042774f6438263459926a3.tar.gz forums-02f9d179e541cf462e042774f6438263459926a3.tar.bz2 forums-02f9d179e541cf462e042774f6438263459926a3.tar.xz forums-02f9d179e541cf462e042774f6438263459926a3.zip |
Merge branch 'prep-release-3.0.12' into develop-olympus
* prep-release-3.0.12:
[prep-release-3.0.12] Update changelog for 3.0.12 release.
[ticket/11873] Add unit test for large password input.
[ticket/11873] Do not hash very large passwords in order to safe resources.
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/functions.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index b2b12c1445..eef4ade4e7 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -502,6 +502,13 @@ function phpbb_hash($password) */ function phpbb_check_hash($password, $hash) { + if (strlen($password) > 4096) + { + // If the password is too huge, we will simply reject it + // and not let the server try to hash it. + return false; + } + $itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; if (strlen($hash) == 34) { |