mirror of
https://github.com/apache/struts.git
synced 2026-08-11 01:27:14 +00:00
WW-5428 Stop excessive logging in DevMode
This commit is contained in:
@@ -224,7 +224,6 @@ public class SecurityMemberAccess implements MemberAccess {
|
||||
*/
|
||||
protected boolean checkAllowlist(Object target, Member member) {
|
||||
if (!enforceAllowlistEnabled) {
|
||||
logAllowlistDisabled();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -259,21 +258,6 @@ public class SecurityMemberAccess implements MemberAccess {
|
||||
return true;
|
||||
}
|
||||
|
||||
private void logAllowlistDisabled() {
|
||||
if (!isDevMode && !LOG.isDebugEnabled()) {
|
||||
return;
|
||||
}
|
||||
String msg = "OGNL allowlist is disabled!" +
|
||||
" We strongly recommend keeping it enabled to protect against critical vulnerabilities." +
|
||||
" Set the configuration `{0}=true` to enable it.";
|
||||
Object[] args = {StrutsConstants.STRUTS_ALLOWLIST_ENABLE};
|
||||
if (isDevMode) {
|
||||
LOG.warn(msg, args);
|
||||
} else {
|
||||
LOG.debug(msg, args);
|
||||
}
|
||||
}
|
||||
|
||||
private void logAllowlistHibernateEntity(Object original, Object resolved) {
|
||||
if (!isDevMode && !LOG.isDebugEnabled()) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user