KEYCLOAK-12281 Fix export/import for users that have custom credential algorithms with no salt

- do not swallow exception when decoding salt
This commit is contained in:
Peter Skopek 2020-01-16 09:33:36 +01:00 committed by Stian Thorgersen
parent b8a8f88764
commit 530b99c933

View file

@ -16,7 +16,7 @@ public class PasswordSecretData {
@JsonCreator
public PasswordSecretData(@JsonProperty("value") String value, @JsonProperty("salt") String salt) throws IOException {
if ("__SALT__".equals(salt)) {
if (salt == null || "__SALT__".equals(salt)) {
this.value = value;
this.salt = null;
}