ChristopherSchultz commented on code in PR #681: URL: https://github.com/apache/tomcat/pull/681#discussion_r1437899157
########## java/org/apache/catalina/filters/CsrfPreventionFilter.java: ########## @@ -87,11 +104,170 @@ public void setNonceRequestParameterName(String parameterName) { this.nonceRequestParameterName = parameterName; } + /** + * Sets the flag to enforce CSRF protection or just log failures as DEBUG + * messages. + * + * @param enforce <code>true</code> to enforce CSRF protections or + * <code>false</code> to log DEBUG messages and allow + * all requests. + */ + public void setEnforce(boolean enforce) { + this.enforce = enforce; + } + + /** + * Gets the flag to enforce CSRF protection or just log failures as DEBUG + * messages. + * + * @return <code>true</code> if CSRF protections will be enforced or + * <code>false</code> if all requests will be allowed and + * failures will be logged as DEBUG messages. + */ + public boolean getEnforce() { Review Comment: I think this is a style question. This isn't really expected to be a "java bean" and doesn't require the `boolean isFoo` and `void setFoo(boolean)` specifically for boolean members. I'll have a look around to see what's common and where. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org