1
0
mirror of https://github.com/misterunknown/ifm.git synced 2025-08-09 17:46:31 +02:00

fixed wrong encoding of remote upload urls

This commit is contained in:
Marco Dickert
2017-09-14 17:11:58 +02:00
parent 2af14ddd72
commit 331e9aace9
4 changed files with 6 additions and 6 deletions

View File

@@ -2120,7 +2120,7 @@ function IFM( params ) {
dir: ifm.currentDir,
filename: filename,
method: method,
url: encodeURI( url )
url: url
}),
dataType: "json",
success: function(data) {
@@ -3540,7 +3540,7 @@ function IFM( params ) {
else {
$fp = fopen( $filename, "w" );
if( $fp ) {
if( !curl_setopt( $ch, CURLOPT_URL, $d['url'] ) || !curl_setopt( $ch, CURLOPT_FILE, $fp ) || !curl_setopt( $ch, CURLOPT_HEADER, 0 ) || !curl_exec( $ch ) )
if( !curl_setopt( $ch, CURLOPT_URL, urldecode( $d['url'] ) ) || !curl_setopt( $ch, CURLOPT_FILE, $fp ) || !curl_setopt( $ch, CURLOPT_HEADER, 0 ) || !curl_exec( $ch ) )
$this->jsonResponse( array( "status" => "ERROR", "message" => $this->l['error']." ".curl_error( $ch ) ) );
else {
$this->jsonResponse( array( "status" => "OK", "message" => $this->l['file_upload_success'] ) );

View File

@@ -2120,7 +2120,7 @@ function IFM( params ) {
dir: ifm.currentDir,
filename: filename,
method: method,
url: encodeURI( url )
url: url
}),
dataType: "json",
success: function(data) {
@@ -3540,7 +3540,7 @@ function IFM( params ) {
else {
$fp = fopen( $filename, "w" );
if( $fp ) {
if( !curl_setopt( $ch, CURLOPT_URL, $d['url'] ) || !curl_setopt( $ch, CURLOPT_FILE, $fp ) || !curl_setopt( $ch, CURLOPT_HEADER, 0 ) || !curl_exec( $ch ) )
if( !curl_setopt( $ch, CURLOPT_URL, urldecode( $d['url'] ) ) || !curl_setopt( $ch, CURLOPT_FILE, $fp ) || !curl_setopt( $ch, CURLOPT_HEADER, 0 ) || !curl_exec( $ch ) )
$this->jsonResponse( array( "status" => "ERROR", "message" => $this->l['error']." ".curl_error( $ch ) ) );
else {
$this->jsonResponse( array( "status" => "OK", "message" => $this->l['file_upload_success'] ) );

View File

@@ -950,7 +950,7 @@ function IFM( params ) {
dir: ifm.currentDir,
filename: filename,
method: method,
url: encodeURI( url )
url: url
}),
dataType: "json",
success: function(data) {

View File

@@ -812,7 +812,7 @@ f00bar;
else {
$fp = fopen( $filename, "w" );
if( $fp ) {
if( !curl_setopt( $ch, CURLOPT_URL, $d['url'] ) || !curl_setopt( $ch, CURLOPT_FILE, $fp ) || !curl_setopt( $ch, CURLOPT_HEADER, 0 ) || !curl_exec( $ch ) )
if( !curl_setopt( $ch, CURLOPT_URL, urldecode( $d['url'] ) ) || !curl_setopt( $ch, CURLOPT_FILE, $fp ) || !curl_setopt( $ch, CURLOPT_HEADER, 0 ) || !curl_exec( $ch ) )
$this->jsonResponse( array( "status" => "ERROR", "message" => $this->l['error']." ".curl_error( $ch ) ) );
else {
$this->jsonResponse( array( "status" => "OK", "message" => $this->l['file_upload_success'] ) );