[Major] Remove password encoding, escape properly on client

This commit is contained in:
Robert von Burg 2019-03-13 20:20:34 +01:00
parent 97bd81542a
commit d15d351b70
2 changed files with 2 additions and 13 deletions

View File

@ -80,13 +80,7 @@ public class AuthenticationService {
String passwordEncoded = login.get("password").getAsString();
byte[] decode = Base64.getDecoder().decode(passwordEncoded);
String passwordString;
if (login.has("encoding") && !login.get("encoding").getAsString().isEmpty()) {
passwordString = new String(decode, login.get("encoding").getAsString());
} else {
passwordString = new String(decode);
}
String passwordString = new String(decode);
char[] password = passwordString.toCharArray();
if (password.length < 3) {
logger.error("Authentication failed: Password was not given or is too short!");

View File

@ -280,12 +280,7 @@ public class PrivilegeUsersService {
String passwordEncoded = jsonObject.get("password").getAsString();
byte[] decode = Base64.getDecoder().decode(passwordEncoded);
String passwordString;
if (jsonObject.has("encoding") && !jsonObject.get("encoding").getAsString().isEmpty()) {
passwordString = new String(decode, jsonObject.get("encoding").getAsString());
} else {
passwordString = new String(decode);
}
String passwordString = new String(decode);
ServiceHandler svcHandler = RestfulStrolchComponent.getInstance().getComponent(ServiceHandler.class);
PrivilegeSetUserPasswordService svc = new PrivilegeSetUserPasswordService();