Needs review
Project:
Auth SSL Redirect
Version:
7.x-1.x-dev
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Jan 2013 at 13:22 UTC
Updated:
9 Feb 2013 at 04:56 UTC
Jump to comment: Most recent file
Comments
Comment #1
coltraneAfter you authenticate can you check on the cookies stored by your browser? Confirm if you have the AUTHSSL cookie or not.
Comment #2
Nephele commentedI experienced the same problem with the module on my test site. I logged in after enabling the module then checked my cookies and there was no AUTHSSL cookie.
In my case at least the problem is that setcookie() was using an invalid domain. My site's URL is "site.local" (because it's my local MAMP-hosted copy of the site), which resulted in auth_ssl_redirect trying to calling setcookie() with a domain of ".local". Based on the PHP documentation and the comments in drupal_settings_initialize(), the same problem probably occurs for anyone using "localhost" or a numeric IP ("127.0.0.1").
In the attached patch, I've adapted the valid-domain test used by drupal_settings_initialize(). The patch fixes the problem for me: after logging in I have a AUTHSSL cookie, and http pages are redirected to https.
(I also took the liberty of tweaking some of code earlier in the function, because having this module alter a global variable, namely $cookie_domain, seems unnecessary and potentially problematic).