#35642 [NEW]: POST var corrupted when single variable posted
| From: | ray at wirestorm dot net | Date: | Mon, 12 Dec 2005 10:57:45 +0000 |
| Subject: | #35642 [NEW]: POST var corrupted when single variable posted | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-90271@lists.php.net to get a copy of this message | ||
From: ray at wirestorm dot net
Operating system: Debian Linux
PHP version: 5.1.1
PHP Bug Type: Apache2 related
Bug description: POST var corrupted when single variable posted
Description:
------------
Apache2 Filter + PHP 5.1.1
When posting a SINGLE post var, the post var appears corrupted, (the raw
post data, it seems, is appended to the end of the value).
When posting multiple post vars, the problem does not appear.
here is my config settings:
'./configure' '--with-xml' '--with-layout=GNU'
'--with-config-file-path=/etc/php5'
'--with-config-file-scan-path=/etc/php5' '--with-sockets'
'--with-mbstring' '--enable-exif' '--enable-xslti'
'--prefix=/usr'
'--with-xsl' '--with-dom' '--with-mysql=/usr/local'
'--with-zlib'
'--with-bzip' '--with-gd' '--enable-shared-pdflib'
'--with-gettext'
'--enable-mailparse' '--with-curl=/usr' '--enable-exif'
'--with-jpeg-dir=/usr/lib/' '--with-png-dir=/usr/lib/'
'--with-ttf=/usr/lib/libttf.so' '--enable-gd-native-ttf'
'--with-xpm-dir=/usr/' '--enable-apc' '--enable-apd'
'--with-mcrypt'
'--with-mhash' '--enable-soap' '--with-apxs2filter=/usr/bin/apxs2'
And a test script is here: http://n0de.net/php-test/
Additionally, a simple perl script doing the same thing produces the
CORRECT result (ie, no post var corruption).
Reproduce code:
---------------
<?
var_dump($_POST);
?>
<form action='.' method='post'>
<textarea name='cmd'></textarea>
<input type='submit' />
</form>
Expected result:
----------------
array(1) {
["cmd"]=>
string(16) "sdfsdf"
}
Actual result:
--------------
array(1) {
["cmd"]=>
string(16) "sdfsdfcmd=sdfsdf"
}
--
Edit bug report at http://bugs.php.net/?id=35642&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=35642&r=trysnapshot44
Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=35642&r=trysnapshot51
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=35642&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=35642&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=35642&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=35642&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=35642&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=35642&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=35642&r=support
Expected behavior: http://bugs.php.net/fix.php?id=35642&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=35642&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=35642&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=35642&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=35642&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=35642&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=35642&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=35642&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=35642&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=35642&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=35642&r=mysqlcfg