Skip to content

Commit

Permalink
[ALS-4981] Validate fence code is alphanumeric
Browse files Browse the repository at this point in the history
  • Loading branch information
Gcolon021 committed Sep 14, 2023
1 parent f791134 commit 67cf41e
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@ public Response getFENCEProfile(String callback_url, Map<String, String> authReq
logger.debug("getFENCEProfile() starting...");
String fence_code = authRequest.get("code");

// Validate that the fence code is alphanumeric
if (!fence_code.matches("[a-zA-Z0-9]+")) {
logger.error("getFENCEProfile() fence code is not alphanumeric");
throw new NotAuthorizedException("The fence code is not alphanumeric");
}

JsonNode fence_user_profile = null;
// Get the Gen3/FENCE user profile. It is a JsonNode object
try {
Expand Down

0 comments on commit 67cf41e

Please sign in to comment.