#40830 [Opn->Bgs]: escapeshellarg() doesn't escape correctly

From: Date: Thu, 15 Mar 2007 21:53:42 +0000
Subject: #40830 [Opn->Bgs]: escapeshellarg() doesn't escape correctly
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-110413@lists.php.net to get a copy of this message
 ID:               40830
 Updated by:       edink@php.net
 Reported By:      xavier dot blanchet at free dot fr
-Status:           Open
+Status:           Bogus
 Bug Type:         CGI related
 Operating System: Windows XP SP2
 PHP Version:      5.2.1
 New Comment:

Windows shell will not pass the trailing " to php. Try dumping $argv[1]
to see it yourself :)


Previous Comments:
------------------------------------------------------------------------

[2007-03-15 20:33:38] xavier dot blanchet at free dot fr

Description:
------------
escapeshellarg() doesn't escape correctly double quotes (enclosing with
simple quotes on Windows does not work anyway...)

Reproduce code:
---------------
conversion.php
--------------
<?php
// The goal is to pass geographic coordinates
echo escapeshellarg($argv[1]);
?>

shell
-----
$ php conversion.php 45°53'36"

Expected result:
----------------
"45°53'36\""

Actual result:
--------------
"45°53'36"


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


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


Thread (3 messages)

« previous php.bugs (#110413) next »