Teh ForumKeep having to log in

 

Press Ctrl+Enter to quickly submit your post
Quick Reply  
 
 
  
 From:  Matt  
 To:  Kenny J (WINGNUTKJ)      
40507.15 In reply to 40507.14 
Yes.

The HTTP specification allows for cookies with the same name, but different paths. Unfortunately as far as I know PHP doesn't account for this, instead all it does is add all the cookies to a simple single-dimension key-value-pair array (named $_COOKIES) and makes them all available to the script regardless of whether the path matches or not.

And because it's perfectly possible for the browser to format the cookie header so as to send the valid cookie before the invalid one, when PHP processes the header, it simply overwrites any existing entry in the array resulting in the valid cookie never being available to the script.

Which is a bit shit.

doohicky

0/0
 Reply   Quote More 

 From:  Kenny J (WINGNUTKJ)   
 To:  Matt     
40507.16 In reply to 40507.15 
Thanks for the explanation!  (Although it's reminded me of just how much I've forgotten about this kind of thing. I'm sure I used to be able to do websites...)

Kenny
0/0
 Reply   Quote More 

 From:  JonCooper  
 To:  ALL
40507.17 
FWIW - I didn't fix my chrome since it wasn't happening anywhere else, it isn't happening here any more - odd

Jon
0/0
 Reply   Quote More 

Reply to All    
 

1–17

Rate my interest:

Adjust text size : Smaller 10 Larger

Beehive Forum 1.5.2 |  FAQ |  Docs |  Support |  Donate! ©2002 - 2024 Project Beehive Forum

Forum Stats