Bug #69982 [NEW]: PHP 5.6 populates $_POST with "invalid" data
From: barry at yourang dot org
Operating system: Linux
PHP version: 5.6.10
Package: Unknown/Other Function
Bug Type: Bug
Bug description:PHP 5.6 populates $_POST with "invalid" data
Description:
------------
Prior to PHP 5.6, POSTing "invalid" urlencoded data would result in
$_POST being an empty array. In PHP 5.6, PHP now populates $_POST, which
is unexpected. This change seems backwards incompatible with previous
versions of PHP and nothing is mentioned in the documentation that I can
find.
Test script:
---------------
Both of these URLs just do:
<?php
var_dump($_POST);
PHP 5.5.24
$ curl http://viper-7.com/hOubxq/5.5.24/ --data
'key'
array(0) {
}
PHP 5.6.10
$ curl http://viper-7.com/h0PMyx/5.6.10/ --data
'key'
array(1) {
["key"]=>
string(0) ""
}
Expected result:
----------------
I would expect the POST request to result in an empty $_POST array in
5.6 just like 5.5
Actual result:
--------------
$_POST is populated with data.
--
Edit bug report at https://bugs.php.net/bug.php?id=69982&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=69982&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=69982&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=69982&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=69982&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=69982&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=69982&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=69982&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=69982&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=69982&r=support
Expected behavior: https://bugs.php.net/fix.php?id=69982&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=69982&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=69982&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=69982&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=69982&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=69982&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=69982&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=69982&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=69982&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=69982&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=69982&r=mysqlcfg
Thread (3 messages)
- barry at yourang dot org