You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The idea here being, I'm coupling apache-phusion form authentication from some custom script (authenticator.py) for an inline login, so that mod_auth_form handles authentication cookies for login sessions. When someone tries to access a sub-url www.example.com/secure/some_file, mod_auth_form would kick in and insert the 401 document for some other location (/index) served by passenger for an inline-login. The intent being that the authenticator script is run and, if successful, the previous request is forwarded to whatever secure sub location the client originally tried to access earlier.
Logging in with the correct credentials works fine - passenger forwards the request as expected. The issue happens with incorrect credentials. Namely, the POST request never returns and the browser/client just hangs on an eternal loading page (until phusion-passenger or apache is restarted). It's as if passenger connects to the socket but doesn't ever forward it to the WSGI application and instead hangs on to it forever. This behaviour does not happen when the ErrorDocument isn't served by passenger. This makes it quite annoying to work with because it'd mean I'd need to make at least 2 application groups... one served by passenger for general views and one served by plain WSGI for the inline login which serves the ErrorDocument views without going through passenger.
CodeGuro
changed the title
Passenger hangs on Request for ErrorDocument 401 with form_method
Passenger hangs on Request for ErrorDocument 401 with form authentication
Nov 2, 2019
I came across this issue when I was playing with phusion for a bit...
Consider the following configuration in apache...
The idea here being, I'm coupling apache-phusion form authentication from some custom script (authenticator.py) for an inline login, so that mod_auth_form handles authentication cookies for login sessions. When someone tries to access a sub-url www.example.com/secure/some_file, mod_auth_form would kick in and insert the 401 document for some other location (/index) served by passenger for an inline-login. The intent being that the authenticator script is run and, if successful, the previous request is forwarded to whatever secure sub location the client originally tried to access earlier.
Logging in with the correct credentials works fine - passenger forwards the request as expected. The issue happens with incorrect credentials. Namely, the POST request never returns and the browser/client just hangs on an eternal loading page (until phusion-passenger or apache is restarted). It's as if passenger connects to the socket but doesn't ever forward it to the WSGI application and instead hangs on to it forever. This behaviour does not happen when the ErrorDocument isn't served by passenger. This makes it quite annoying to work with because it'd mean I'd need to make at least 2 application groups... one served by passenger for general views and one served by plain WSGI for the inline login which serves the ErrorDocument views without going through passenger.
For reference (here are the docs), my authenticator script:
...and the HTML served by the web-application, minimal example:
Also, this seems to be an issue exclusive to form authentication. The basic authentication doesn't cause the requests to hang.
The text was updated successfully, but these errors were encountered: