If your Drupal site forces some areas to HTTPS and others to HTTP, two cookies are created when logging in (one for each mode). The Twitter Sign-in module doesn't seem to respect this and only creates one cookie. This means that when logging out, things get confused and you end up in a sort of half-logged-in state (logged in to HTTPS and logged out of HTTP).
The attached patch *seems* to fix this, but I'm not sure if it's the best way to do it. Patched against 7.x-3.0-beta4.
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | twitter-n1514284-11-6x-5.x.patch | 2.24 KB | damienmckenna |
| #7 | twitter-n1514284-6-7.x-6.x.patch | 457 bytes | damienmckenna |
| #6 | twitter-n1514284-5-7.x-5.x.patch | 457 bytes | damienmckenna |
Comments
Comment #1
juampynr commentedHmmm, I have no idea to be honest. I will wait a little bit so more people can chime in while I review other issues.
Comment #2
13rac1 commentedOld patch applies to 7.x-5.x with offset. Unable to test further. Normally Drupal HTTP and HTTPS are separate logins. How does this patch change the login/logout process?
Comment #3
damienmckennaTriggering the testbot.
Comment #4
damienmckennaTriggering the testbot.
Comment #5
damienmckennaComment #6
damienmckennaI don't believe this is needed, the oauth callback function already calls user_login_finalize(). However, lets pass along the standard $form_state arguments into user_login_finalize() that user_login_submit() passes, so that the hooks can be triggered correctly.
Comment #7
damienmckennaPorted to 7.x-6.x.
Comment #8
damienmckennaI also suspect the cookie issue is a problem in core rather than something in the Twitter module - there are no calls to setcookie() in twitter_signup, instead it just uses the user's existing session.
Comment #10
damienmckennaSome similar cleanup for the 6.x-5.x branch.
Comment #11
damienmckennaSome additional comment improvements for the D6 branch.
Comment #12
damienmckennaCommitted.