Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Improvement suggestion

edited December 2011 in Vanilla 2.0 - 2.8

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.

Best Answer

  • Options
    TimTim Operations Vanilla Staff
    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 COO [GitHub, Twitter, About.me]

Answers

  • Options
    TimTim Operations Vanilla Staff

    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 COO [GitHub, Twitter, About.me]

  • Options
    edited December 2011

    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 )

  • Options
    TimTim Operations Vanilla Staff
    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 COO [GitHub, Twitter, About.me]

  • Options

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

  • Options
    TimTim Operations Vanilla Staff

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

    Vanilla Forums COO [GitHub, Twitter, About.me]

Sign In or Register to comment.