|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #75883 Documentation about name of a session should be less restrictive
Submitted: 2018-01-29 09:03 UTC Modified: 2019-01-02 00:55 UTC
Avg. Score:4.3 ± 0.9
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: thomas dot gerbet at enalean dot com Assigned:
Status: Open Package: Session related
PHP Version: Irrelevant OS:
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
40 - 17 = ?
Subscribe to this entry?

 [2018-01-29 09:03 UTC] thomas dot gerbet at enalean dot com
From manual page:

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.



Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2018-05-12 17:35 UTC] gadelat at gmail dot com
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.

 [2019-01-02 00:55 UTC]
-Package: Documentation problem +Package: Session related
 [2021-03-22 11:37 UTC] robertworner786 at gmail dot com
Learn Web Design and Development - 
HTML Tutorials for Beginners - Learn the fundamentals of the latest HTML5 markup language in simple and easy steps and start building your own website. In this tutorial you’ll learn html font size, html code tag and more.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Sep 22 23:03:39 2021 UTC