demianturner / sgl-docs-tickets-migration-test

0 stars 0 forks source link

SGL_Task_StripMagicQuotes remove backslashes at wrong point #1680

Open demianturner opened 11 years ago

demianturner commented 11 years ago

The static function dispelMagicQuotes of SGL_String un-quotes all input-vars (strings) if get_magic_quotes_gpc() returns true.

This cause errors doing a fileupload on a windows machine, because normaly the tmp-path of uploaded file is something like "c:\pathToApache\tmp\php56Fxx.tmp"

One Solution is to double the backslashes on SGL_Request class where $_FILES are merge to $aPros.

demianturner commented 11 years ago

[demian] this is easy to fix, waiting for patch from a windows guys :-)

demianturner commented 11 years ago

[michas] I did it in this way:

{{{
// merge REQUEST AND FILES superglobal arrays $allFiles = array(); foreach ($_FILES as $key=>$value) { $allFiles[$key] = str_replace("\", "\", $value); } $this->aProps = array_merge($_GET, $allFiles, $aQueryData, $_POST); }}}

But not sure if this is efficient.

Greetings from Germany