Skip to content

Commit

Permalink
Secure that service cannot be update to empty value. #2554
Browse files Browse the repository at this point in the history
  • Loading branch information
vertigo17 committed Dec 2, 2024
1 parent 443a36d commit 415aab6
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,12 @@ final void processRequest(final HttpServletRequest request, final HttpServletRes
* Checking all constrains before calling the services.
*/
if (StringUtil.isEmptyOrNull(originalService)) {
msg = new MessageEvent(MessageEventEnum.DATA_OPERATION_ERROR_EXPECTED);
msg.setDescription(msg.getDescription().replace("%ITEM%", "AppService")
.replace("%OPERATION%", "Update")
.replace("%REASON%", "AppService ID (originalService) is missing."));
finalAnswer.setResultMessage(msg);
} else if (StringUtil.isEmptyOrNull(service)) {
msg = new MessageEvent(MessageEventEnum.DATA_OPERATION_ERROR_EXPECTED);
msg.setDescription(msg.getDescription().replace("%ITEM%", "AppService")
.replace("%OPERATION%", "Update")
Expand Down

0 comments on commit 415aab6

Please sign in to comment.