Skip to content

Commit f8f510e

Browse files
committed
Ensure valid actor ID in actorExists method
Updated the actorExists method to validate that the actor ID is not blank and adheres to ObjectId format. This prevents invalid or malformed IDs from causing issues during runtime.
1 parent f8f3649 commit f8f510e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • application-engine/src/main/java/com/netgrif/application/engine/workflow/service

application-engine/src/main/java/com/netgrif/application/engine/workflow/service/TaskService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,7 @@ private List<String> getExistingActors(ActorListFieldValue actorListFieldValue)
865865
}
866866

867867
private boolean actorExists(ActorFieldValue actorFieldValue) {
868-
if (actorFieldValue == null || actorFieldValue.getId() == null) {
868+
if (actorFieldValue == null || actorFieldValue.getId() == null || actorFieldValue.getId().isBlank() || !ObjectId.isValid(actorFieldValue.getId())) {
869869
return false;
870870
}
871871
AbstractUser user = userService.findById(actorFieldValue.getId(), actorFieldValue.getRealmId());

0 commit comments

Comments
 (0)