Doc #75883 [Com]: Documentation about name of a session should be less restrictive

From: Date: Sat, 12 May 2018 17:35:44 +0000
Subject: Doc #75883 [Com]: Documentation about name of a session should be less restrictive
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-15690@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=75883&edit=1

 ID:                 75883
 Comment by:         gadelat at gmail dot com
 Reported by:        thomas dot gerbet at enalean dot com
 Summary:            Documentation about name of a session should be less
                     restrictive
 Status:             Open
 Type:               Documentation Problem
 Package:            Documentation problem
 PHP Version:        Irrelevant
 Block user comment: N
 Private report:     N

 New Comment:

I believe this is due to legacy reasons. In past, PHP had register globals settings, which means
cookie names must meet PHP variable naming restrictions. This option no longer exists, so I think
this restriction should be elevated.

See https://harrybailey.com/2009/04/dots-arent-allowed-in-php-cookie-names/


Previous Comments:
------------------------------------------------------------------------
[2018-01-29 09:03:03] thomas dot gerbet at enalean dot com

Description:
------------
---
From manual page: http://www.php.net/function.session-name
---

Documentation mentions that only alphanum chars should be used as a session name since the name can
be used in URLs and cookies.
This is a bit too restrictive and prevent for example to use the cookie prefixes restriction [1]
browser feature.

According to RFC1738 and RFC3986 the characters $-_.+!*'(), should also be safe to use in URLs
and it seems that RFC6265 does not add more limitations for cookies. These characters can probably
be added to the documentation as "safe to use" as the name of a session.



[1] https://tools.ietf.org/html/draft-west-cookie-prefixes



------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=75883&edit=1


Thread (5 messages)

« previous php.doc.bugs (#15690) next »