[Bug 732306] [NEW] php escapeshellarg removes £ incorrectly
PeterJCLaw
732306 at bugs.launchpad.net
Wed Mar 9 22:46:14 UTC 2011
Public bug reported:
Binary package hint: php5
escapeshellarg unexpectedly removes £ symbols from input strings.
I was going to report this as a bug to php, but I can't reproduce this bug under PHP 5.3.5 on windows 7.
Additionally there is discrepancy between the command-line runner and the apache module.
$ php --version
PHP 5.3.3-1ubuntu9.3 with Suhosin-Patch (cli) (built: Jan 12 2011 16:07:38)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
<?php
// test script
$before = '!+_£@#&;`|*?~<>^()[]{}$\,';
var_dump($before);
$escaped = escapeshellarg($before);
var_dump($escaped);
for ($i=0; $i < 10; $i++)
{
var_dump($escaped[$i]);
}
?>
Expected:
string(26) "!+_£@#&;`|*?~<>^()[]{}$\,"
string(26) "'!+_£@#&;`|*?~<>^()[]{}$\,'"
string(1) "'"
string(1) "!"
string(1) "+"
string(1) "_"
string(1) "£"
string(1) "@"
string(1) "#"
string(1) "&"
string(1) ";"
string(1) "`"
Actual (via apache):
string(26) "!+_£@#&;`|*?~<>^()[]{}$\,"
string(26) "'!+_@#&;`|*?~<>^()[]{}$\,'"
string(1) "'"
string(1) "!"
string(1) "+"
string(1) "_"
string(1) "@"
string(1) "#"
string(1) "&"
string(1) ";"
string(1) "`"
string(1) "|"
Actual (command-line: $ php -f test.php)
string(26) "!+_£@#&;`|*?~<>^()[]{}$\,"
string(28) "'!+_£@#&;`|*?~<>^()[]{}$\,'"
string(1) "'"
string(1) "!"
string(1) "+"
string(1) "_"
string(1) "�"
string(1) "�"
string(1) "@"
string(1) "#"
string(1) "&"
string(1) ";"
** Affects: php5 (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to php5 in ubuntu.
https://bugs.launchpad.net/bugs/732306
Title:
php escapeshellarg removes £ incorrectly
More information about the Ubuntu-server-bugs
mailing list