summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-02-14 14:34:20 +0100
committerVincent Petry <pvince81@owncloud.com>2014-02-14 14:34:20 +0100
commitd7f454771769d37e06136332f15695a98275f0f5 (patch)
tree687d4cee17b79d16ed3060c94fe9a896a9883aa8
parent595b908b740d36fba9aeeaa51e9c533969efaf0c (diff)
parentd49c7ad4fb1745600f33f0acc67fa39faca3e3e4 (diff)
downloadnextcloud-server-d7f454771769d37e06136332f15695a98275f0f5.tar.gz
nextcloud-server-d7f454771769d37e06136332f15695a98275f0f5.zip
Merge pull request #6726 from owncloud/fix_6630
don't urldecode get var, php does this automatically
-rw-r--r--apps/files_sharing/ajax/publicpreview.php2
-rw-r--r--apps/files_sharing/templates/public.php2
-rw-r--r--apps/files_trashbin/ajax/preview.php2
-rw-r--r--apps/files_trashbin/lib/trashbin.php2
-rw-r--r--core/ajax/preview.php2
5 files changed, 5 insertions, 5 deletions
diff --git a/apps/files_sharing/ajax/publicpreview.php b/apps/files_sharing/ajax/publicpreview.php
index a52f522afac..d12d212a2e6 100644
--- a/apps/files_sharing/ajax/publicpreview.php
+++ b/apps/files_sharing/ajax/publicpreview.php
@@ -11,7 +11,7 @@ if(!\OC_App::isEnabled('files_sharing')){
\OC_User::setIncognitoMode(true);
-$file = array_key_exists('file', $_GET) ? (string) urldecode($_GET['file']) : '';
+$file = array_key_exists('file', $_GET) ? (string) $_GET['file'] : '';
$maxX = array_key_exists('x', $_GET) ? (int) $_GET['x'] : '36';
$maxY = array_key_exists('y', $_GET) ? (int) $_GET['y'] : '36';
$scalingUp = array_key_exists('scalingup', $_GET) ? (bool) $_GET['scalingup'] : true;
diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php
index 3ddaf4446df..3eb84ce1672 100644
--- a/apps/files_sharing/templates/public.php
+++ b/apps/files_sharing/templates/public.php
@@ -35,7 +35,7 @@
<?php else: ?>
<div id="imgframe">
<?php $size = \OC\Preview::isMimeSupported($_['mimetype']) ? 500 : 128 ?>
- <img src="<?php p(OCP\Util::linkToRoute( 'core_ajax_public_preview', array('x' => $size, 'y' => $size, 'file' => urlencode($_['directory_path']), 't' => $_['dirToken']))); ?>" class="publicpreview"/>
+ <img src="<?php p(OCP\Util::linkToRoute( 'core_ajax_public_preview', array('x' => $size, 'y' => $size, 'file' => $_['directory_path'], 't' => $_['dirToken']))); ?>" class="publicpreview"/>
</div>
<?php endif; ?>
<div class="directDownload">
diff --git a/apps/files_trashbin/ajax/preview.php b/apps/files_trashbin/ajax/preview.php
index 44738734b19..ce64d9ecc9f 100644
--- a/apps/files_trashbin/ajax/preview.php
+++ b/apps/files_trashbin/ajax/preview.php
@@ -11,7 +11,7 @@ if(!\OC_App::isEnabled('files_trashbin')){
exit;
}
-$file = array_key_exists('file', $_GET) ? (string) urldecode($_GET['file']) : '';
+$file = array_key_exists('file', $_GET) ? (string) $_GET['file'] : '';
$maxX = array_key_exists('x', $_GET) ? (int) $_GET['x'] : '44';
$maxY = array_key_exists('y', $_GET) ? (int) $_GET['y'] : '44';
$scalingUp = array_key_exists('scalingup', $_GET) ? (bool) $_GET['scalingup'] : true;
diff --git a/apps/files_trashbin/lib/trashbin.php b/apps/files_trashbin/lib/trashbin.php
index 7544980e071..9b7d578c990 100644
--- a/apps/files_trashbin/lib/trashbin.php
+++ b/apps/files_trashbin/lib/trashbin.php
@@ -996,6 +996,6 @@ class Trashbin {
}
public static function preview_icon($path) {
- return \OC_Helper::linkToRoute( 'core_ajax_trashbin_preview', array('x' => 36, 'y' => 36, 'file' => urlencode($path) ));
+ return \OC_Helper::linkToRoute( 'core_ajax_trashbin_preview', array('x' => 36, 'y' => 36, 'file' => $path ));
}
}
diff --git a/core/ajax/preview.php b/core/ajax/preview.php
index af0f0493f4c..a1267d6f5cf 100644
--- a/core/ajax/preview.php
+++ b/core/ajax/preview.php
@@ -7,7 +7,7 @@
*/
\OC_Util::checkLoggedIn();
-$file = array_key_exists('file', $_GET) ? (string) urldecode($_GET['file']) : '';
+$file = array_key_exists('file', $_GET) ? (string) $_GET['file'] : '';
$maxX = array_key_exists('x', $_GET) ? (int) $_GET['x'] : '36';
$maxY = array_key_exists('y', $_GET) ? (int) $_GET['y'] : '36';
$scalingUp = array_key_exists('scalingup', $_GET) ? (bool) $_GET['scalingup'] : true;