-
Notifications
You must be signed in to change notification settings - Fork 313
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can I change password's hash algorithm? #270
Comments
Take a look here
Because this is a radical change in the repository will be better to set a configuration parameter to switch between md5 and the new password crypt. Take a look at this class about how to create a new configuration parameter https://github.com/openkm/document-management-system/blob/master/src/main/java/com/openkm/core/Config.java ( use it to switch between md5 -> default and bcrypt ) I suggest something like import import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
BCryptPasswordEncoder bcrypt = new BCryptPasswordEncoder();
user.setPassword(bcrypt.encode(user.getPassword())); |
@darkman97i Thank you for answer. |
No, in the code when you create a new user and set the password must use the right crypt type to store in the database. That happens with all the applications adding or changing password algorithm it means changes in the code ( in this case minimal changes ) |
For personal use, I made a SHA-256 patch for version 6.3.9. |
We will try to add in the next release ... in future better fork the project and then ask for a pull request from your branch to ours. @gnujavasergio ask me before working on it |
I want to change the hash algorithm of user account password from MD5 to SHA256 or bcrypt.
I tried changing the Hash algorithm in the OpenKM.xml file, but it didn't work well. If the user changes the password, it is saved as MD5 in the DB and cannot log in again.
<security:password-encoder hash="md5"/>
Can I modify the settings to use SHA256 or bcrypt?
OpenKM version is 6.3.9(CE).
The text was updated successfully, but these errors were encountered: