From aa9fe087f54eeaa6977d1f76616b10e21f447531 Mon Sep 17 00:00:00 2001 From: Ali Oezyetimoglu Date: Tue, 2 Jul 2024 14:45:50 +0200 Subject: [PATCH] RED-9512: added null check for SMTP password when updating configuration --- .../controller/external/SMTPConfigurationController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/knecon/fforesight/tenantusermanagement/controller/external/SMTPConfigurationController.java b/src/main/java/com/knecon/fforesight/tenantusermanagement/controller/external/SMTPConfigurationController.java index 65601e2..9b1991b 100644 --- a/src/main/java/com/knecon/fforesight/tenantusermanagement/controller/external/SMTPConfigurationController.java +++ b/src/main/java/com/knecon/fforesight/tenantusermanagement/controller/external/SMTPConfigurationController.java @@ -57,7 +57,7 @@ public class SMTPConfigurationController implements SMTPConfigurationResource, P var propertiesMap = convertSMTPConfigurationModelToMap(smtpConfigurationModel); realmRepresentation.setSmtpServer(propertiesMap); - if (!smtpConfigurationModel.getPassword().matches("\\**")) { + if (smtpConfigurationModel.getPassword() != null && !smtpConfigurationModel.getPassword().matches("\\**")) { realmRepresentation.getAttributesOrEmpty().put(SMTP_PASSWORD_KEY, encryptionDecryptionService.encrypt(smtpConfigurationModel.getPassword())); }