Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Vanilla's cookies and Wordpress' cookies don't mix

2

Comments

  • MarkMark Vanilla Staff
    Logging out isn't enough. Make sure you manually delete the cookies from your browser.
  • here's my process:

    cleared all cookies and cache.

    went to the site, post comes up fine.

    went to the forum, logged in.

    went to the site with posts, reloaded - no posts.

    logged out of forum.

    back to the site, reloaded - still no posts (whereas before the posts were there when I reloaded after logging out).
  • the user shouldn't have to clear the cookies after logging out though?
  • MarkMark Vanilla Staff
    edited July 2005
    God damn I hate wordpress.
    God damn I have a great disdain for wordpress at present moment
  • i emailed 3stripe to try this out too..
  • MarkMark Vanilla Staff
    edited July 2005
    You don't have to delete your cookies every time. I just wanted to make sure that your old "name" and "pass" vanilla cookies were gone. Wordpress must do some wacky shit with cookies if I can't give my cookies a name like VANILLAname and VANILLApass without it screwing up THEIR application.
  • testing the fix right now, stay tuned...
  • the cookies are still showing up as name and pass in my browser? wtf?
  • ditto lament.
  • lamentlament
    edited July 2005
    yeah so i double checked.. the cookies are still coming up as name and pass. shouldn't they be coming up as VANILLAname and VANILLApass?
  • MarkMark Vanilla Staff
    Yes, they should. I might have missed something - hang on while I check...
  • MarkMark Vanilla Staff
    Oh man. My bad. Missed two lines of code. Full fix coming... hang on while I type...
  • Good luck guys, just tried the first fix so hopefully tune in tomorrow for the happy ending - need some sleep first though
  • Yeah mark, the fix you're about to post works.
  • MarkMark Vanilla Staff
    library/Vanilla.User.class.php lines 1057, 1058

    Change this:
    setcookie("pass", $EncryptedUserID, time()+31104000,"/",agCOOKIE_DOMAIN);
    setcookie("name", $VerificationKey, time()+31104000,"/",agCOOKIE_DOMAIN);
    To this:
    setcookie("vanillapass", $EncryptedUserID, time()+31104000,"/",agCOOKIE_DOMAIN);
    setcookie("vanillaname", $VerificationKey, time()+31104000,"/",agCOOKIE_DOMAIN);
    library/Vanilla.User.class.php lines 1243 & 1244

    Change this:
    $EncryptedUserID = ForceIncomingCookieString("pass", "");
    $VerificationKey = ForceIncomingCookieString("name", "");
    To this:
    $EncryptedUserID = ForceIncomingCookieString("vanillapass", "");
    $VerificationKey = ForceIncomingCookieString("vanillaname", "");
    library/Vanilla.Session.class.php lines 35 - 38

    Change this:
    setcookie("name", " ", time()-3600,"/",agCOOKIE_DOMAIN);
    unset($_COOKIE["name"]);
    setcookie("pass", " ", time()-3600,"/",agCOOKIE_DOMAIN);
    unset($_COOKIE["pass"]);
    To this:
    setcookie("vanillaname", " ", time()-3600,"/",agCOOKIE_DOMAIN);
    unset($_COOKIE["vanillaname"]);
    setcookie("vanillapass", " ", time()-3600,"/",agCOOKIE_DOMAIN);
    unset($_COOKIE["vanillapass"]);
    Then be sure to clear your browser of your existing vanilla cookies to prevent any further conflicts. You only need to do this once to get rid of the old cookie values. You shouldn't have to do it again in the future.

    I need sleep.
  • If it doesn't I'll eat his hat, pixel by pixel.
  • lamentlament
    edited July 2005
    success! thank you!

    I'll just link to this post in the WP forum unless you're worried about what people will think about the hate/strong disdain for wordpress comment.

    otherwise i'll just post the code on the WP forum.. :)


    i just posted the code on the forum here.
  • MarkMark Vanilla Staff
    Can you post that the fix applies to vanilla <= version 0.9.2 It will be fixed in version 0.9.3 and I don't want people mucking up future versions. Thanks!
  • done.
  • ah hah! so thats why my wordpress ate itself!
This discussion has been closed.