Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Leen-Meyer:test
tomcat6
apache-tomcat-isconfigproblemfatal.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File apache-tomcat-isconfigproblemfatal.patch of Package tomcat6
Index: apache-tomcat-6.0.33-src/java/org/apache/catalina/filters/FilterBase.java =================================================================== --- apache-tomcat-6.0.33-src.orig/java/org/apache/catalina/filters/FilterBase.java 2011-08-16 14:26:14.000000000 +0200 +++ apache-tomcat-6.0.33-src/java/org/apache/catalina/filters/FilterBase.java 2012-01-05 11:35:54.627279703 +0100 @@ -49,8 +49,13 @@ String paramName = (String) paramNames.nextElement(); if (!IntrospectionUtils.setProperty(this, paramName, filterConfig.getInitParameter(paramName))) { - getLogger().warn(sm.getString("filterbase.noSuchProperty", - paramName, this.getClass().getName())); + String msg = sm.getString("filterbase.noSuchProperty", + paramName, this.getClass().getName()); + if (isConfigProblemFatal()) { + throw new ServletException(msg); + } else { + getLogger().warn(msg); + } } } } @@ -59,4 +64,15 @@ // NOOP } + /** + * Determines if an exception when calling a setter or an unknown + * configuration attribute triggers the failure of the this filter which in + * turn will prevent the web application from starting. + * + * @return <code>true</code> if a problem should trigger the failure of this + * filter, else <code>false</code> + */ + protected boolean isConfigProblemFatal() { + return false; + } } Index: apache-tomcat-6.0.33-src/java/org/apache/catalina/filters/CsrfPreventionFilter.java =================================================================== --- apache-tomcat-6.0.33-src.orig/java/org/apache/catalina/filters/CsrfPreventionFilter.java 2011-08-16 14:26:14.000000000 +0200 +++ apache-tomcat-6.0.33-src/java/org/apache/catalina/filters/CsrfPreventionFilter.java 2012-01-05 11:35:54.644280296 +0100 @@ -186,6 +186,13 @@ chain.doFilter(request, wResponse); } + + @Override + protected boolean isConfigProblemFatal() { + return true; + } + + /** * Generate a once time token (nonce) for authenticating subsequent * requests. This will also add the token to the session. The nonce Index: apache-tomcat-6.0.33-src/webapps/docs/changelog.xml =================================================================== --- apache-tomcat-6.0.33-src.orig/webapps/docs/changelog.xml 2012-01-05 11:35:44.000000000 +0100 +++ apache-tomcat-6.0.33-src/webapps/docs/changelog.xml 2012-01-05 11:35:54.654280645 +0100 @@ -435,6 +435,10 @@ At build time use two alternative download locations for components downloaded from apache.org. (kkolinko) </update> + <add> + Make configuration issue for CsrfPreventionFilter result in the + failure of the filter rather than just a warning message. (kkolinko) + </add> </changelog> </subsection> </section>
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor