From 0168585d79b9ef932aa234a54c853001a346c4d3 Mon Sep 17 00:00:00 2001 From: cdujeu Date: Mon, 21 May 2018 13:28:54 +0200 Subject: [PATCH] Read latest_note url from server data instead of passing url as parameter --- .../res/js/AdminPlugins/updater/UpdaterDashboard.js | 2 +- core/src/plugins/action.updater/UpdateController.php | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core/src/plugins/access.ajxp_conf/res/js/AdminPlugins/updater/UpdaterDashboard.js b/core/src/plugins/access.ajxp_conf/res/js/AdminPlugins/updater/UpdaterDashboard.js index 6ac8d806bf..9df11c7e2e 100644 --- a/core/src/plugins/access.ajxp_conf/res/js/AdminPlugins/updater/UpdaterDashboard.js +++ b/core/src/plugins/access.ajxp_conf/res/js/AdminPlugins/updater/UpdaterDashboard.js @@ -47,7 +47,7 @@ const UpdaterDashboard = React.createClass({ this.setState({packages:response.packages}); if(response.latest_note){ let latest = response.latest_note; - latest = pydio.Parameters.get('ajxpServerAccess')+"&get_action=display_upgrade_note&url=" + encodeURIComponent(latest); + latest = pydio.Parameters.get('ajxpServerAccess') + '&get_action=display_upgrade_note'; this.setState({src:latest}); } }else{ diff --git a/core/src/plugins/action.updater/UpdateController.php b/core/src/plugins/action.updater/UpdateController.php index 3e5c6cc018..5ee87781db 100644 --- a/core/src/plugins/action.updater/UpdateController.php +++ b/core/src/plugins/action.updater/UpdateController.php @@ -114,7 +114,9 @@ public function switchAction($action, $httpVars, $fileVars, \Pydio\Core\Model\Co case "display_upgrade_note": - $url = $httpVars["url"]; + //$url = $httpVars["url"]; + $data = UpgradeManager::getUpgradePath($this->pluginConf["UPDATE_SITE"], "php", $this->pluginConf["UPDATE_CHANNEL"]); + $url = $data["latest_note"]; $context = UpgradeManager::getContext(); if ($context != null) { $content = file_get_contents($url, null, $context);