Skip to content

Commit 6630df5

Browse files
committed
Add warning if log_settings init parameter is specified as it is now ignored.
1 parent 40564a4 commit 6630df5

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/main/java/org/owasp/esapi/waf/ESAPIWebApplicationFirewallFilter.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,18 @@ public void init(FilterConfig fc) throws ServletException {
139139

140140
logger.debug(Logger.EVENT_SUCCESS, ">> Initializing WAF");
141141
/*
142-
* Pull logging file.
142+
* Pull logging file. -- We now ignore this arg, but will log something
143+
* letting users know we are ignoring it, because many of them never
144+
* seem to read the release notes. And this is probably better than
145+
* throwing an exception.
143146
*/
147+
String logSettingsFilename = fc.getInitParameter(LOGGING_FILE_PARAM);
148+
if ( logSettingsFilename != null ) {
149+
logger.warning(Logger.EVENT_FAILURE, ">> Since ESAPI 2.5.0.0, ESAPI WAF ignoring parameter '" +
150+
LOGGING_FILE_PARAM + "; for further details, see " +
151+
"https://github.com/ESAPI/esapi-java-legacy/blob/develop/documentation/esapi4java-core-2.5.0.0-release-notes.txt");
152+
153+
}
144154

145155
/*
146156
* Pull main configuration file.

0 commit comments

Comments
 (0)