Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.1.6
-
None
-
N/A
Description
TokenSessionStoreInterceptor fails when no token is provided.
java.lang.NullPointerException at java.util.TreeMap.getEntry(Unknown Source) at java.util.TreeMap.get(Unknown Source) at org.apache.struts2.util.TokenHelper.getToken(TokenHelper.java:101) at org.apache.struts2.interceptor.TokenSessionStoreInterceptor.handleInvalidToken(TokenSessionStoreInterceptor.java:117) at org.apache.struts2.interceptor.TokenInterceptor.doIntercept(TokenInterceptor.java:141) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87)
...
It looks like it could be solved if the TokenHelper class checks to make sure it isn't trying to look up a null token name and just returns null immediately.