From bffd903770f86a8ac2da2d7e5ef07f0e158e22dc Mon Sep 17 00:00:00 2001 From: Valentino Giardino <77643678+valentinogiardino@users.noreply.github.com> Date: Tue, 20 Aug 2024 11:04:57 -0300 Subject: [PATCH] fix(Logging) : Log less page details when making an unauthorized GraphQL request #29651 (#29652) ### Proposed Changes * Change log to only display `htmlPageAsset.getURI()` ### Screenshots ### Before: ![image](https://github.com/user-attachments/assets/bb3ea6cd-cadf-45fb-9234-4706563928b7) ### After: ![image](https://github.com/user-attachments/assets/fe5b293d-0239-4b3a-af71-77b08cc7589a) This PR fixes: #29651 --- .../business/render/HTMLPageAssetRenderedAPIImpl.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dotCMS/src/main/java/com/dotmarketing/portlets/htmlpageasset/business/render/HTMLPageAssetRenderedAPIImpl.java b/dotCMS/src/main/java/com/dotmarketing/portlets/htmlpageasset/business/render/HTMLPageAssetRenderedAPIImpl.java index e38951e44635..a1219b8d3f82 100644 --- a/dotCMS/src/main/java/com/dotmarketing/portlets/htmlpageasset/business/render/HTMLPageAssetRenderedAPIImpl.java +++ b/dotCMS/src/main/java/com/dotmarketing/portlets/htmlpageasset/business/render/HTMLPageAssetRenderedAPIImpl.java @@ -377,9 +377,9 @@ private void checkPagePermission(final PageContext context, final IHTMLPage html context.getPageMode().respectAnonPerms); if (!doesUserHavePermission) { - final String message = String.format("User: %s does not have permissions %s for object %s", + final String message = String.format("User: %s does not have permissions %s for page %s", context.getUser(), - PermissionLevel.READ, htmlPageAsset); + PermissionLevel.READ, htmlPageAsset.getURI()); throw new DotSecurityException(message); } }