fixed getRandomStringNullPrefix
This commit is contained in:
@ -102,7 +102,7 @@ public abstract class PasswordUtil {
|
|||||||
String usedPrefix = (prefix == null ? "" : prefix);
|
String usedPrefix = (prefix == null ? "" : prefix);
|
||||||
|
|
||||||
int idLength = length - usedPrefix.length();
|
int idLength = length - usedPrefix.length();
|
||||||
return prefix + createSaltString(idLength);
|
return usedPrefix + createSaltString(idLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,16 +1,7 @@
|
|||||||
/*
|
|
||||||
* To change this template, choose Tools | Templates
|
|
||||||
* and open the template in the editor.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package de.muehlencord.shared.security;
|
package de.muehlencord.shared.security;
|
||||||
|
|
||||||
import static de.muehlencord.shared.security.PasswordUtil.getScryptHash;
|
import static de.muehlencord.shared.security.PasswordUtil.getScryptHash;
|
||||||
import static de.muehlencord.shared.security.PasswordUtil.validateScryptHash;
|
import static de.muehlencord.shared.security.PasswordUtil.validateScryptHash;
|
||||||
import org.junit.After;
|
|
||||||
import org.junit.AfterClass;
|
|
||||||
import org.junit.Before;
|
|
||||||
import org.junit.BeforeClass;
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import static org.junit.Assert.*;
|
import static org.junit.Assert.*;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user