You are here: Conversion of period and space for $_GET, $_REQUEST, etc. is rather senseless « PHP « IT news, forums, messages
Conversion of period and space for $_GET, $_REQUEST, etc. is rather senseless

Posted by Joe Krahn on 07/01/05 06:47

PHP imports GET and POST data to array elements by senselessly
converting periods and spaces to underscore. The intent is to make
strings variable-name compatible for conversion directly into global
variables via import_request_variables or register_globals.

String-to-variable name mangling should only occur when being converted
to variable names, but should be left as is when accessed as array
elements. The current implementation is particularly bad because it
mangles only periods and spaces, but leaves alone other special/unusual
characters. Furthermore, the direct conversion into global name space is
discouraged for security reasons.

A feature-request was made related to this, but it was marked as "Won't
Fix", primarily due to compatibility concerns. However, I think it's a
poor design, and there must be some compatible way to move beyond this
misfeature.

Do other people really want to keep the period/space name mangling for
array keys, and not just for variable names? And, what happens when
importing other special characters to variable names?

Joe Krhn

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация