Skip to content

Commit

Permalink
feature/IVYPORTAL-18034-Information-exposure-through-an-error-message
Browse files Browse the repository at this point in the history
- Handle security warning
  • Loading branch information
lmluat-axonivy committed Dec 17, 2024
1 parent 559ae67 commit 7aa4622
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import com.axonivy.portal.response.GlobalSearchResponse;
import com.axonivy.portal.service.GlobalSearchService;

import ch.ivyteam.ivy.environment.Ivy;
import ch.ivyteam.ivy.security.ISecurityConstants;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
Expand All @@ -30,7 +31,8 @@ public Response processes(SearchPayload payload) {
GlobalSearchResponse result = service.searchProcesses(payload);
return Response.ok(result).build();
} catch (NotFoundException e) {
return Response.status(Status.NOT_FOUND).entity(e.getMessage()).build();
Ivy.log().error(e);
return Response.status(Status.NOT_FOUND).build();
}
}

Expand All @@ -42,7 +44,8 @@ public Response tasks(SearchPayload payload) {
GlobalSearchResponse result = service.searchTasks(payload);
return Response.ok(result).build();
} catch (NotFoundException e) {
return Response.status(Status.NOT_FOUND).entity(e.getMessage()).build();
Ivy.log().error(e);
return Response.status(Status.NOT_FOUND).build();
}
}

Expand All @@ -54,7 +57,8 @@ public Response cases(SearchPayload payload) {
GlobalSearchResponse result = service.searchCases(payload);
return Response.ok(result).build();
} catch (NotFoundException e) {
return Response.status(Status.NOT_FOUND).entity(e.getMessage()).build();
Ivy.log().error(e);
return Response.status(Status.NOT_FOUND).build();
}
}
}

0 comments on commit 7aa4622

Please sign in to comment.