dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #34209
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17562: Use proper password matcher for bcrypt passes
------------------------------------------------------------
revno: 17562
committer: Halvdan Hoem Grelland <halvdanhg@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2014-11-21 12:04:14 +0100
message:
Use proper password matcher for bcrypt passes
modified:
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AccountController.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AccountController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AccountController.java 2014-11-11 12:51:06 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/AccountController.java 2014-11-21 11:04:14 +0000
@@ -472,9 +472,7 @@
return;
}
- String oldPasswordEncoded = passwordManager.encodePassword( oldPassword );
-
- if ( !credentials.getPassword().equals( oldPasswordEncoded ) )
+ if( !passwordManager.matches( oldPassword, credentials.getPassword() ) )
{
result.put( "status", "NON_MATCHING_PASSWORD" );
result.put( "message", "Old password is wrong, please correct and try again." );