From ac2d59af63f2e78c6f6b3284133717cee031af0c Mon Sep 17 00:00:00 2001
From: pbarroca <pbarroca@afi-sa.fr>
Date: Tue, 3 Nov 2015 16:57:34 +0100
Subject: [PATCH] rel #32361 : hotfix filemanager auth on uploads

---
 VERSIONS_HOTLINE/32361                                      | 1 +
 .../connectors/php/filemanager.config.php                   | 6 +++++-
 2 files changed, 6 insertions(+), 1 deletion(-)
 create mode 100644 VERSIONS_HOTLINE/32361

diff --git a/VERSIONS_HOTLINE/32361 b/VERSIONS_HOTLINE/32361
new file mode 100644
index 00000000000..90da1393a67
--- /dev/null
+++ b/VERSIONS_HOTLINE/32361
@@ -0,0 +1 @@
+ - ticket #32361 : Impossibilité de charger des images dans le gestionnaire
\ No newline at end of file
diff --git a/ckeditor/core_five_filemanager/connectors/php/filemanager.config.php b/ckeditor/core_five_filemanager/connectors/php/filemanager.config.php
index 3f6b28cd969..8fa83280b53 100644
--- a/ckeditor/core_five_filemanager/connectors/php/filemanager.config.php
+++ b/ckeditor/core_five_filemanager/connectors/php/filemanager.config.php
@@ -30,7 +30,11 @@ function auth() {
 
   require_once($base_path . 'cosmogramme/storm_init.php');
   setupSession();
-  return (new Class_FileManager())->isAuthorized($_GET['path']);
+
+  $path = array_key_exists('path', $_GET) ? $_GET['path'] : '';
+  $path = array_key_exists('currentpath', $_POST) ? $_POST['currentpath'] : $path;
+
+  return (new Class_FileManager())->isAuthorized($path);
 }
 
 
-- 
GitLab