Inconsistent handling of parenthesis in auth flow name (#24113)
closes #16379
This commit is contained in:
parent
5ff5e12782
commit
1ac2c0997d
2 changed files with 11 additions and 0 deletions
|
@ -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) {
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue