Page Menu
Home
In-Portal Phabricator
Search
Configure Global Search
Log In
Files
F847859
D255.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Apr 19, 7:07 PM
Size
675 B
Mime Type
text/x-diff
Expires
Sun, Apr 20, 7:07 PM (23 m, 59 s)
Engine
blob
Format
Raw Data
Handle
602645
Attached To
D255: INP-1593 - Auto-detect format of provided password in "kPasswordFormatter::hashPassword" method for migrated users
D255.diff
View Options
Index: branches/5.2.x/core/kernel/utility/formatters/password_formatter.php
===================================================================
--- branches/5.2.x/core/kernel/utility/formatters/password_formatter.php
+++ branches/5.2.x/core/kernel/utility/formatters/password_formatter.php
@@ -208,7 +208,8 @@
break;
case PasswordHashingMethod::MD5_AND_PHPPASS:
- return $this->_phpPass->hashPassword($this->_md5hash($password, $salt, true));
+ $password_hashed = preg_match('/^[a-f0-9]{32}$/', $password);
+ return $this->_phpPass->hashPassword($this->_md5hash($password, $salt, $password_hashed));
break;
case PasswordHashingMethod::PHPPASS:
Event Timeline
Log In to Comment