Req #42055 [Opn->Dup]: FR: Allow access to non-mangled form field names regardless of enctype.

From: Date: Tue, 06 Oct 2015 20:39:42 +0000
Subject: Req #42055 [Opn->Dup]: FR: Allow access to non-mangled form field names regardless of enctype.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-196440@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=42055&edit=1 ID: 42055 Updated by: bishop@php.net Reported by: david at sickmiller dot com Summary: FR: Allow access to non-mangled form field names regardless of enctype. -Status: Open +Status: Duplicate Type: Feature/Change Request -Package: Feature/Change Request +Package: *General Issues Operating System: Irrelevant PHP Version: 5.2.3 Block user comment: N Private report: N New Comment: Calling this a duplicate of https://bugs.php.net/bug.php?id=34882 Previous Comments: ------------------------------------------------------------------------ [2007-07-20 18:45:20] david at sickmiller dot com 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 this bug report at https://bugs.php.net/bug.php?id=42055&edit=1

« previous php.bugs (#196440) next »