diff --git a/src/main/java/de/caritas/cob/userservice/api/helper/Helper.java b/src/main/java/de/caritas/cob/userservice/api/helper/Helper.java index 37bc4a8e1..387475fc8 100644 --- a/src/main/java/de/caritas/cob/userservice/api/helper/Helper.java +++ b/src/main/java/de/caritas/cob/userservice/api/helper/Helper.java @@ -62,9 +62,10 @@ public String urlDecodeString(String stringToDecode) { } String tempPassword = stringToDecode.replace("%", PERCENT); tempPassword = tempPassword.replace("+", PLUS); - String decodedPassword = java.net.URLDecoder.decode(tempPassword, StandardCharsets.UTF_8.name()); - decodedPassword = decodedPassword.replace(PERCENT, "%"); // Restore the original percent signs - return decodedPassword.replace(PLUS, "+"); // Restore the original percent signs + String decodedPassword = + java.net.URLDecoder.decode(tempPassword, StandardCharsets.UTF_8.name()); + decodedPassword = decodedPassword.replace(PERCENT, "%"); // Restore the original percent signs + return decodedPassword.replace(PLUS, "+"); // Restore the original percent signs } catch (UnsupportedEncodingException ex) { return null; diff --git a/src/main/java/de/caritas/cob/userservice/api/workflow/delete/action/asker/DeleteRoomsAndSessionAction.java b/src/main/java/de/caritas/cob/userservice/api/workflow/delete/action/asker/DeleteRoomsAndSessionAction.java index 20307aa4c..833512ac7 100644 --- a/src/main/java/de/caritas/cob/userservice/api/workflow/delete/action/asker/DeleteRoomsAndSessionAction.java +++ b/src/main/java/de/caritas/cob/userservice/api/workflow/delete/action/asker/DeleteRoomsAndSessionAction.java @@ -78,7 +78,7 @@ protected void deleteSession(Session session, List workfl } void performSessionDeletion(Session session, List workflowErrors) { - + deleteSessionData(session, workflowErrors); deleteSession(session, workflowErrors); deleteRocketChatGroup(session.getGroupId(), workflowErrors); diff --git a/src/test/java/de/caritas/cob/userservice/api/helper/HelperTest.java b/src/test/java/de/caritas/cob/userservice/api/helper/HelperTest.java index a3d0561b8..bfd3320b7 100644 --- a/src/test/java/de/caritas/cob/userservice/api/helper/HelperTest.java +++ b/src/test/java/de/caritas/cob/userservice/api/helper/HelperTest.java @@ -59,6 +59,8 @@ public void removeHTMLFromText_ShouldNot_RemoveNewslinesFromText() { public void shouldCorrectlyDecodePassword() { assertEquals("password", helper.urlDecodeString("password")); assertEquals("Test!@#$%^&*()1234", helper.urlDecodeString("Test!@#$%^&*()1234")); - assertEquals("_$87q,+Np4xc5+FC:Vcg7W#mx@JTE!R~2SmEuU9a>cbDNx4.Ap++rEys.%7GJ5r", helper.urlDecodeString("_$87q,+Np4xc5+FC:Vcg7W#mx@JTE!R~2SmEuU9a>cbDNx4.Ap++rEys.%7GJ5r")); + assertEquals( + "_$87q,+Np4xc5+FC:Vcg7W#mx@JTE!R~2SmEuU9a>cbDNx4.Ap++rEys.%7GJ5r", + helper.urlDecodeString("_$87q,+Np4xc5+FC:Vcg7W#mx@JTE!R~2SmEuU9a>cbDNx4.Ap++rEys.%7GJ5r")); } }