java.lang.IllegalArgumentException tomcat 8.5 and MixedAuthenticator

105 views
Skip to first unread message

Arnaud MERGEY

unread,
Oct 10, 2019, 5:55:33 AM10/10/19
to waffle
I am trying to configure MixedAuthenticator Valve (Waffle 1.9.0) in tomcat 8.5. 
I followed valve documentation from github.
the POST to index.jsp?j_negotiate_check is working, I am logged as current user.
the POST to index.jsp?j_security_check is also working but with a bad experience,I am authenticated but the first page I get is a 500 page:

java.lang.IllegalArgumentException: Path [] does not start with a "/" character
	at org.apache.catalina.core.ApplicationContext.getRequestDispatcher(ApplicationContext.java:403)
	at org.apache.catalina.core.ApplicationContextFacade.getRequestDispatcher(ApplicationContextFacade.java:223)
	at waffle.apache.MixedAuthenticator.redirectTo(MixedAuthenticator.java:275)
	at waffle.apache.MixedAuthenticator.authenticate(MixedAuthenticator.java:105)
It seems to be because request.getServletPath() return nulls for this king of mapping ;

<servlet-mapping> <servlet-name>bridgeservlet</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping>

Maybe I am wrong but maybe MixedAuthenticator should behave the same for FORM and negotiate authentication and return the this.post(request, response) result instead of trying to redirect

Arnaud

Daniel D.

unread,
Oct 10, 2019, 9:30:19 AM10/10/19
to waffle...@googlegroups.com
Looks like a bug to me. I didn't know getServletPath could return null in scenarios like these when I wrote it. Please feel free to PR/fix.

--
You received this message because you are subscribed to the Google Groups "waffle" group.
To unsubscribe from this group and stop receiving emails from it, send an email to waffle-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/waffle-users/d7c279ce-e49a-4765-9389-807de6a406e1%40googlegroups.com.


--

Arnaud MERGEY

unread,
Oct 10, 2019, 10:57:16 AM10/10/19
to waffle
Hello, thanks for replying,  you can find this PR https://github.com/Waffle/waffle/pull/800

Arnaud
Reply all
Reply to author
Forward
0 new messages