Changeset 14323


Ignore:
Timestamp:
08/07/12 20:02:32 (12 years ago)
Author:
tbretz
Message:
Some security update to the escaping.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/www/smartfact/index.php

    r14232 r14323  
    177177        $args = "";
    178178        foreach ($_GET as $key => $value)
    179             $args .= ' '.$key.'="'.escape($value).'"';
     179            $args .= ' "'.$key.'"="'.$value.'"';
    180180
    181181        // $args = "filename":label --arg:"key1=value" --arg:"key2=value"
    182         $cmd = $path.'/dimctrl --user "'.$_SERVER['PHP_AUTH_USER'].'"  --start "'.$script.escape($args).'"';
     182        $cmd = $path.'/dimctrl --user "'.$_SERVER['PHP_AUTH_USER'].'"  --start '.escapeshellarg($script.$args);
    183183
    184184        // Execute
     
    200200
    201201        // $args = "filename":label --arg:"key1=value" --arg:"key2=value"
    202         $cmd = $path.'/dimctrl --user "'.$_SERVER['PHP_AUTH_USER'].'"  --msg "'.$msg.'"';
     202        $cmd = $path.'/dimctrl --user "'.$_SERVER['PHP_AUTH_USER'].'"  --msg '.escapeshellarg($msg);
    203203
    204204        // Execute
Note: See TracChangeset for help on using the changeset viewer.