From d63df349ec82ec25cca4f04ff1600395434dd4c4 Mon Sep 17 00:00:00 2001 From: Jacek Kowalski <Jacek@jacekk.info> Date: Fri, 21 Jun 2024 09:31:59 +0000 Subject: [PATCH] Remove "parsing" of "codeUUID" that is String, not UUID --- src/main/java/org/keycloak/protocol/cas/endpoints/AbstractValidateEndpoint.java | 10 +--------- 1 files changed, 1 insertions(+), 9 deletions(-) diff --git a/src/main/java/org/keycloak/protocol/cas/endpoints/AbstractValidateEndpoint.java b/src/main/java/org/keycloak/protocol/cas/endpoints/AbstractValidateEndpoint.java index ee0a752..8f282f0 100644 --- a/src/main/java/org/keycloak/protocol/cas/endpoints/AbstractValidateEndpoint.java +++ b/src/main/java/org/keycloak/protocol/cas/endpoints/AbstractValidateEndpoint.java @@ -103,20 +103,12 @@ throw new CASValidationException(CASErrorCode.INVALID_TICKET_SPEC, "Invalid format of the code", Response.Status.BAD_REQUEST); } + String codeUUID = parsed[0]; String userSessionId = parsed[1]; String clientUUID = parsed[2]; event.detail(Details.CODE_ID, userSessionId); event.session(userSessionId); - - // Parse UUID - String codeUUID; - try { - codeUUID = parsed[0]; - } catch (IllegalArgumentException re) { - event.error(Errors.INVALID_CODE); - throw new CASValidationException(CASErrorCode.INVALID_TICKET_SPEC, "Invalid format of the UUID in the code", Response.Status.BAD_REQUEST); - } // Retrieve UserSession UserSessionModel userSession = new UserSessionCrossDCManager(session).getUserSessionWithClient(realm, userSessionId, clientUUID); -- Gitblit v1.9.1