#29165 [Bgs->Opn]: Request variables are being escaped

2004-07-21 Thread guardkarma-php at yahoo dot com
 ID:   29165
 User updated by:  guardkarma-php at yahoo dot com
 Reported By:  guardkarma-php at yahoo dot com
-Status:   Bogus
+Status:   Open
-Bug Type: Output Control
+Bug Type: Scripting Engine problem
 Operating System: Mac OS X
 PHP Version:  5.0.0
 New Comment:

This problem also makes PHP 5 not 100% backward 
compatible.


Previous Comments:


[2004-07-15 22:31:31] itsbrady-php at yahoo dot com

I don't think the bug is bogus, for several reasons:

#1) Any valid form input should be able to map to PHP. Sometimes PHP
isn't the only programming environment present. Sometimes PHP might
have to interoperate with other environments which might have different
variable naming conventions, etc.

#2) The entire reason we chose to use apostrophes in our form variable
names was to work around PHP's remapping from . to _ within variable
names (e.g., foo.var => foo_var). We can't just remap back from
underscore to period to "regenerate" the original variable name,
because that might remap legitimate uses of the underscore (example,
foo_something.var gets mapped to foo_something_var, and if you tried to
map it back you'd get foo.something.var, which doesn't match).

#3) It used to work fine in all previous versions of PHP we've used
(throughout the PHP 4.x series).

#4) We certainly do not want PHP to create Global variables like
$foo'var - that would be nuts. We just want to access a perfectly valid
key in a hash - $_REQUEST["foo'var"]. There's no language rule against
any such key, and no real reason not to support variables so named on
forms.



[2004-07-15 11:40:16] [EMAIL PROTECTED]

We don't support variable names with wierd characters, so the result is
undefined.

------------------------

[2004-07-14 22:52:30] guardkarma-php at yahoo dot com

Description:

When upgrading from php 4.3 to 5.0 and using the same 
php.ini file, form variable names with apostrophe 
characters are now being escaped.

magic_quotes_gpc = Off
magic_quotes_runtime = Off
magic_quotes_sybase = Off


Reproduce code:
---
// mydomain.com/script.php?variable'name=value


Expected result:

Array (  [variable'name] => value )

Actual result:
--
Array (  [variable\'name] => value )





-- 
Edit this bug report at http://bugs.php.net/?id=29165&edit=1


#29165 [NEW]: Request variables are being escaped

2004-07-14 Thread guardkarma-php at yahoo dot com
From: guardkarma-php at yahoo dot com
Operating system: Mac OS X
PHP version:  5.0.0
PHP Bug Type: Output Control
Bug description:  Request variables are being escaped

Description:

When upgrading from php 4.3 to 5.0 and using the same 
php.ini file, form variable names with apostrophe 
characters are now being escaped.

magic_quotes_gpc = Off
magic_quotes_runtime = Off
magic_quotes_sybase = Off


Reproduce code:
---
// mydomain.com/script.php?variable'name=value


Expected result:

Array (  [variable'name] => value )

Actual result:
--
Array (  [variable\'name] => value )

-- 
Edit bug report at http://bugs.php.net/?id=29165&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=29165&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=29165&r=trysnapshot5
Fixed in CVS:   http://bugs.php.net/fix.php?id=29165&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=29165&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=29165&r=needtrace
Need Reproduce Script:  http://bugs.php.net/fix.php?id=29165&r=needscript
Try newer version:  http://bugs.php.net/fix.php?id=29165&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=29165&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=29165&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=29165&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=29165&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=29165&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=29165&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=29165&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=29165&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=29165&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=29165&r=float