FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » Question about cookies.inc.t
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Question about cookies.inc.t [message #185533] Wed, 09 April 2014 18:58 Go to next message
eclipsewebmaster is currently offline  eclipsewebmaster   
Messages: 46
Registered: November 2009
Location: Ottawa, Ontario, Canada
Karma: 0
Member
cookies.inc.t has this code near line 49:

   /* $p > 8 https:// or http:// */
   if (($p = strpos($_SERVER['HTTP_REFERER'], $host)) === false || $p > 8) {
       $q_opt .= ' AND s.user_id > 2000000000 ';
   }


I'm trying to understand what that is for. Our authentication process happens on a separate hostname (dev.eclipse.org) than the forum itself (www.eclipse.org). After the authentication process, we redirect the browser to fudforum's index.php/l/ so that fud can load up the session, but it never does since p > 8. Hitting fudforum's "Login" link a second time works, since HTTP_REFERER and $host are now the same machine.

I'm going to remove that snippet of code to fix my own authentication process, but I'm just wondering why you'd want to tack on a condition (AND s.user_id > 2000000000) which is likely never met.

[Updated on: Wed, 09 April 2014 19:11]

Report message to a moderator

Re: Question about cookies.inc.t [message #185573 is a reply to message #185533] Sun, 13 April 2014 06:04 Go to previous messageGo to next message
naudefj is currently offline  naudefj   
Messages: 3771
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
I guess you can also disable "Referrer Checking" for your forum. If Referrer Checking is enabled, the referer MUST match the host name. If not, the (AND s.user_id > 2000000000) condition will be added to treat it as an anonymous session.

In your case, you may want to change the code to match "same domain" instead of "same host".

[Updated on: Sun, 13 April 2014 06:04]

Report message to a moderator

Re: Question about cookies.inc.t [message #185593 is a reply to message #185573] Thu, 17 April 2014 18:31 Go to previous message
eclipsewebmaster is currently offline  eclipsewebmaster   
Messages: 46
Registered: November 2009
Location: Ottawa, Ontario, Canada
Karma: 0
Member
Thanks for the info!
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Can I stop subscription notification?
Next Topic: Lightbox plugin help getting started
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 22 11:45:19 GMT 2024

Total time taken to generate the page: 0.01717 seconds