You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by ku...@apache.org on 2024/07/08 17:56:29 UTC
(struts) 01/01: WW-5428 Stop excessive logging in DevMode
This is an automated email from the ASF dual-hosted git repository.
kusal pushed a commit to branch WW-5428-stop-excessive-logging
in repository https://gitbox.apache.org/repos/asf/struts.git
commit 87853d4f6b2de759c312325ddce9344acff909ca
Author: Kusal Kithul-Godage <gi...@kusal.io>
AuthorDate: Tue Jul 9 03:56:17 2024 +1000
WW-5428 Stop excessive logging in DevMode
---
.../main/java/com/opensymphony/xwork2/ognl/SecurityMemberAccess.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/SecurityMemberAccess.java b/core/src/main/java/com/opensymphony/xwork2/ognl/SecurityMemberAccess.java
index f225b3c89..1d88df099 100644
--- a/core/src/main/java/com/opensymphony/xwork2/ognl/SecurityMemberAccess.java
+++ b/core/src/main/java/com/opensymphony/xwork2/ognl/SecurityMemberAccess.java
@@ -224,7 +224,6 @@ public class SecurityMemberAccess implements MemberAccess {
*/
protected boolean checkAllowlist(Object target, Member member) {
if (!enforceAllowlistEnabled) {
- logAllowlistDisabled();
return true;
}
@@ -495,6 +494,9 @@ public class SecurityMemberAccess implements MemberAccess {
@Inject(value = StrutsConstants.STRUTS_ALLOWLIST_ENABLE, required = false)
public void useEnforceAllowlistEnabled(String enforceAllowlistEnabled) {
this.enforceAllowlistEnabled = BooleanUtils.toBoolean(enforceAllowlistEnabled);
+ if (!this.enforceAllowlistEnabled) {
+ logAllowlistDisabled();
+ }
}
@Inject(value = STRUTS_ALLOWLIST_CLASSES, required = false)