mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-14 21:43:11 +00:00
Upgraded hashes were not committed to the database
This commit is contained in:
@@ -933,7 +933,20 @@ public class EPerson extends DSpaceObject
|
|||||||
|
|
||||||
// If using the old unsalted hash, and this password is correct, update to a new hash
|
// If using the old unsalted hash, and this password is correct, update to a new hash
|
||||||
if (answer && (null == myRow.getStringColumn("digest_algorithm")))
|
if (answer && (null == myRow.getStringColumn("digest_algorithm")))
|
||||||
|
{
|
||||||
|
log.info("Upgrading password hash for EPerson " + getID());
|
||||||
setPassword(attempt);
|
setPassword(attempt);
|
||||||
|
try {
|
||||||
|
myContext.turnOffAuthorisationSystem();
|
||||||
|
update();
|
||||||
|
} catch (SQLException ex) {
|
||||||
|
log.error("Could not update password hash", ex);
|
||||||
|
} catch (AuthorizeException ex) {
|
||||||
|
log.error("Could not update password hash", ex);
|
||||||
|
} finally {
|
||||||
|
myContext.restoreAuthSystemState();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return answer;
|
return answer;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user