Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter

Categories

In this Discussion

  • Neck December 2011
  • Tim December 2011

Who's Online 11

CurtisOdenericgillettefh111tc74422 +6 guests

Improvement suggestion

This discussion is related to the Vanilla Proxyconnect addon.

In class.proxyauthenticator.php replace in CheckCookie()

if (empty($_COOKIE[$this->_CookieName]))
    return FALSE;

By

if (empty($_COOKIE[$this->_CookieName]))
    return null;

Then in WakeUp()

  $HaveHandshake = $this->CheckCookie();
  if ($HaveHandshake)
     return;

By

  $HaveHandshake = $this->CheckCookie();
  if ($HaveHandshake || $HaveHandshake === null)
     return;

Purpose: avoids performing a proxy request if the handshake cookie is not present.

I'm not 100% sure about it since i'm new to vanilla. But I noticed proxyconnect does a request even when the proxy cookie is not set which makes no sense.

Comments

  • TimTim
    Posts: 1,573

    Requests are done to the remote site to check for a logged-in session. This needs to happen regardless of any local cookies that may be set, since we don't know what the remote site uses for its cookies, we just blindly forward all cookies.

    Vanilla Forums Senior Developer [GitHub, Twitter, About.me]

  • Posts: 3

    May I ask what is the purpose of the "VanillaProxy" cookie then?

    (To be more precise, I was thinking this cookie need to be set in order to have Vanilla perform the proxy request, I'm confused about its use now =D )

  • TimTim
    Posts: 1,573 Accepted Answer

    It has been some time since I worked actively on ProxyConnect, but if memory serves, that cookie is designed to retain the foreign signin data during the Sync Screen stage for users that need to take extra setup steps. The cookie's presence prevents redirect loops, and preserves the sync data across requests.

    Vanilla Forums Senior Developer [GitHub, Twitter, About.me]

  • Posts: 3

    That makes sense. So it is actually only used for internal mechanic, time to remove it from my application. Sorry for the misunderstanding!

  • TimTim
    Posts: 1,573

    No problem. ProxyConnect is not the most straightforward plugin :)

    Vanilla Forums Senior Developer [GitHub, Twitter, About.me]

Sign In or Register to comment.