changed the way the url is escaped. should fix #14
This commit is contained in:
parent
ce3b71c934
commit
637a781f24
2
api.php
2
api.php
@ -10,7 +10,7 @@ $resizewidth = $_GET['width'];
|
|||||||
$cache = $_GET['cache'];
|
$cache = $_GET['cache'];
|
||||||
$onfail = rawurldecode($_GET['onfail']);
|
$onfail = rawurldecode($_GET['onfail']);
|
||||||
|
|
||||||
$params = array('url'=>$url,
|
$params = array('url'=>trim($url),
|
||||||
'type'=>$type,
|
'type'=>$type,
|
||||||
'timeout'=>$timeout,
|
'timeout'=>$timeout,
|
||||||
'viewport'=>$viewport,
|
'viewport'=>$viewport,
|
||||||
|
@ -210,7 +210,7 @@ class http2pic
|
|||||||
$cmd.=' -f png';
|
$cmd.=' -f png';
|
||||||
|
|
||||||
//add url to cmd
|
//add url to cmd
|
||||||
$cmd.=' '.escapeshellarg($this->params['url']);
|
$cmd.=' \''.addslashes($this->params['url']).'\'';
|
||||||
|
|
||||||
//add storage path to cmd
|
//add storage path to cmd
|
||||||
$cmd.=' '.escapeshellarg($this->params['file']);
|
$cmd.=' '.escapeshellarg($this->params['file']);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user