Mixed auth: Strange 404 errors when using dns alias - Fix included
Hi,
I had some strange errors on a server with several dns alias names like: srvx.sub.c srvy.sub.c srvy.sub.sub.c srvz.sub.c The primary name is srvx.sub.sub.c
Versions: Tomcat Version : Apache Tomcat/7.0.50 Servlet Specification Version : 3.0 JSP version : 2.2
The problem occured when I tried to login thru the login-form using the primary name or an particular alias name. Other alias names didn't have that problem.
Regardless of the authentication method, when the form submitted the POST request to index.jsp?
FIX:
I changed the loginform to include the hidden fields "j_negotiate_check" and "j_security_check", so they get POSTED, instead of mixing POST and GET by using "index.jsp?
BTW: thank you for his great piece of software
cheers Micky
<form method="POST" name="loginform" action="/myapp/index.jsp"> <input type="submit" value="Mit Windows Credentials anmelden" /> <input type="hidden" name="j_negotiate_check" value="1"> </form> <br> <form method="POST" name="loginform" action="/myapp/index.jsp"> <table style="vertical-align: middle;"> <tr> <td>Username:</td> <td><input type="text" name="j_username" /></td> </tr> <tr> <td>Password:</td> <td><input type="password" name="j_password" /></td> </tr> <tr> <td><input type="submit" value="Login" /></td> </tr> </table> <input type="hidden" name="j_security_check" value="1"> </form>
Nice. Can you please PR the actual fix? See https://github.com/Waffle/waffle#contributing
@micky0867 Can you write a PR for your fixes?