note 92804 deleted from function.setcookie by googleguy
| From: | googleguy@php.net | Date: | Tue, 22 Oct 2013 11:15:31 +0000 |
| Subject: | note 92804 deleted from function.setcookie by googleguy | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-197044@lists.php.net to get a copy of this message | ||
Note Submitter: info at daniel-marschall dot de
----
Be careful when setting a domain value. The browsers have curious results (I tested with FireFox 3
only!).
If session.cookie_domain is "", then your browser will probably make the cookie only
available for your domain "www.example.com". That's secure since subdomains probably
cannot access the cookie.
If the session.cookie_domain has a value, for example "www.example.com", all browsers
which are according to the RFC, will add a "." prefix to the domain. So
"www.example.com" will be converted to ".www.example.com" by the browser. Now
the cookie is not as secure as the cookie above since it is also accessable at subdomains.
Strange...