|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #65252 Input string parsing - allow ' ' and '.' chars as hash key
Submitted: 2013-07-12 13:33 UTC Modified: 2021-02-08 14:25 UTC
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: matti dot jarvinen at nitroid dot fi Assigned:
Status: Suspended Package: URL related
PHP Version: master OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: matti dot jarvinen at nitroid dot fi
New email:
PHP Version: OS:


 [2013-07-12 13:33 UTC] matti dot jarvinen at nitroid dot fi
Since register_globals has been removed in PHP 5.4.0 there should be no reason other than legacy why input variables ($_POST, $_GET, $_FILES, $_COOKIE, $_REQUEST) can not have keys containing following characters

chr(32) ( ) (space)
chr(46) (.) (dot)

Documentation states that only . is changed to _ but same goes for above characters.

Test script:
<form method="POST">
<input type="text" name="foo bar" value="spaced" />
<input type="text" name="" value="dotted" />
<input type="submit" value="send" />




  "foo bar"=>'spaced',

Actual result:


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2013-07-19 22:59 UTC]
-Summary: Input string parsing +Summary: Input string parsing - allow ' ' and '.' chars as hash key -PHP Version: 5.4.17 +PHP Version: master
 [2013-07-19 22:59 UTC]
This may break apps, but request is debatable.
 [2013-11-23 15:07 UTC] dan dot lugg at gmail dot com
I'd like to second this report/request. With register_globals having been deprecated and removed quite some time ago now, it would be great to see some of the accommodations made for that feature cleaned up.

While it is perfectly understandable that this could cause BC breaks, an INI flag would certainly fix this.

; Can be set to "" to prevent 
; replacement altogether
form_char_replace=". "
 [2021-02-08 14:25 UTC]
-Status: Open +Status: Suspended
 [2021-02-08 14:25 UTC]
This topic comes up in internals discussions from time to time.
Unless someone pursues the RFC process[1], nothing will change. :(

[1] <>
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Tue Jul 05 00:05:45 2022 UTC