Inconsistent handling of parenthesis in auth flow name (#24113)

closes #16379
This commit is contained in:
kaustubh-rh 2023-10-20 13:30:46 +05:30 committed by GitHub
parent 5ff5e12782
commit 1ac2c0997d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View file

@ -291,6 +291,8 @@ public class AuthenticationManagementResource {
throw ErrorResponse.exists("Failed to update flow with empty alias name"); throw ErrorResponse.exists("Failed to update flow with empty alias name");
} }
ReservedCharValidator.validate(flow.getAlias());
//check if updating a correct flow //check if updating a correct flow
AuthenticationFlowModel checkFlow = realm.getAuthenticationFlowById(id); AuthenticationFlowModel checkFlow = realm.getAuthenticationFlowById(id);
if (checkFlow == null) { if (checkFlow == null) {

View file

@ -361,6 +361,15 @@ public class FlowTest extends AbstractAuthenticationTest {
} catch (ClientErrorException exception){ } catch (ClientErrorException exception){
//expoected //expoected
} }
//try to update old flow with an alias with illegal characters
testFlow.setAlias("New(Flow");
try {
authMgmtResource.updateFlow(found.getId(), testFlow);
} catch (ClientErrorException exception){
//expected
}
flows = authMgmtResource.getFlows(); flows = authMgmtResource.getFlows();
//name should be the same for the old Flow //name should be the same for the old Flow