#42055 [NEW]: FR: Allow access to non-mangled form field names regardless of enctype.
From: david at sickmiller dot com
Operating system: Irrelevant
PHP version: 5.2.3
PHP Bug Type: Feature/Change Request
Bug description: FR: Allow access to non-mangled form field names regardless of enctype.
Description:
------------
It should be possible to access to non-mangled form field names regardless
of enctype.
Background: PHP automagically formats $_POST by treating square brackets
([]) in the form names as array indicators. PHP also converts whitespaces
and other special characters to underscores (_). Normally, this is useful.
However, it causes problems when using complicated form field names, such
as those with square brackets, whitespaces, and punctuation. Using special
characters in form field names is valid HTML.
When the form enctype="application/x-www-form-urlencoded", the raw data is
accessible via file_get_contents('php://input'), and it is possible to
construct a non-mangled version of the submitted form fields.
When the form enctype="multipart/form-data", the raw data is NOT
accessible via file_get_contents('php://input') or any other means. Thus,
it is not possible to accept file uploads and still access the original
field names.
This is similar to Bug #34882, except that I am not aware of any
work-around.
I understand that mangling the form field names is often convenient, but
it shouldn't be *impossible* to access the raw field names.
--
Edit bug report at http://bugs.php.net/?id=42055&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=42055&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=42055&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=42055&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=42055&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=42055&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=42055&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=42055&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=42055&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=42055&r=support
Expected behavior: http://bugs.php.net/fix.php?id=42055&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=42055&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=42055&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=42055&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=42055&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=42055&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=42055&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=42055&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=42055&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=42055&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=42055&r=mysqlcfg
Thread (2 messages)
- david at sickmiller dot com