[MAGNOLIA-2085] When registering a bypass filter of class URIStartsWithVoter causes the server to die Created: 12/Mar/08  Updated: 23/Jan/13  Resolved: 12/Mar/08

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: 3.5.4
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: Ryan Gardner Assignee: Philipp Bärfuss
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled
Date of First Response:

 Description   

All I did was follow the instructions on the wiki exactly as they are written... After I created the nodeData for the class of the bypass filter - and before I could put any more information in it - the server died with this message:

http://wiki.magnolia.info/display/WIKI/HowTo+Setup+Custom+404+Handler

Mar 11, 2008 5:59:42 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet default threw exception
java.lang.NullPointerException
at info.magnolia.cms.filters.MgnlMainFilter.doFilter(MgnlMainFilter.java:97)
at info.magnolia.cms.filters.MgnlMainFilter.doFilter(MgnlMainFilter.java:195)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:354)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)

I couldn't do anything to get it back at that point, and had to restore the app from a backup.

It was as if the filter was being immediately put into effect, before it was even configured fully. Even if it were configured completely wrong, there is really no excuse for the server to completely die because of a bad user input.



 Comments   
Comment by Jan Haderka [ 12/Mar/08 ]

As with all other configuration changes in magnolia they are applied immediately. Since empty pattern is valid pattern for the voter it is considered configured even before you enter desired pattern. It would be nice to have temp space for configuration and activate all changes later, but not possible with current UI.
I've updated the page with a warning that all changes are applied immediately and recommendation to configure bypass node outside of its location and move it to the proper place only once it is configured.
To repair broken filter chain follow http://wiki.magnolia.info/display/WIKI/Repair+broken+bypass+configuration

Generated at Mon Feb 12 03:33:16 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.