We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 45c3ca7 commit 6fdbb05Copy full SHA for 6fdbb05
portal-kernel/src/com/liferay/portal/kernel/security/pwd/PasswordEncryptor.java
@@ -54,8 +54,13 @@ public String encrypt(
54
public default String getEncryptedPasswordAlgorithmSettings(
55
String encryptedPassword) {
56
57
- return encryptedPassword.substring(
58
- 1, encryptedPassword.indexOf(CharPool.CLOSE_CURLY_BRACE));
+ int index = encryptedPassword.indexOf(CharPool.CLOSE_CURLY_BRACE);
+
59
+ if (index < 0) {
60
+ return null;
61
+ }
62
63
+ return encryptedPassword.substring(1, index);
64
}
65
66
0 commit comments