Skip to content

Commit a7a5626

Browse files
committed
Fixujp
1 parent 579cc69 commit a7a5626

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

dataplane/src/main/java/io/sentrius/sso/core/services/security/ZeroTrustRequestService.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,12 @@ public void revokeJIT(ZeroTrustAccessTokenRequest ztatRequest, Long userId) {
193193
}
194194

195195
public Optional<OpsApproval> getOpsTokenStatus(String token ) {
196-
return opsApprovalRepository.findByToken(UUID.fromString(token));
196+
try {
197+
return opsApprovalRepository.findByToken(UUID.fromString(token));
198+
}catch (IllegalArgumentException e){
199+
log.error("Invalid UUID token format: {}", token);
200+
return Optional.empty();
201+
}
197202
}
198203

199204
public Optional<ZeroTrustAccessTokenApproval> getAccessTokenStatus(ZeroTrustAccessTokenRequest request) {

0 commit comments

Comments
 (0)