From 02662193b595e4b4c03a7ce592109a1d44fcd896 Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Mon, 24 Jun 2013 21:40:30 +0200 Subject: [PATCH] Fixed package installation via update servers --- wcfsetup/install/files/acp/js/WCF.ACP.js | 4 ++-- .../lib/data/package/update/PackageUpdateAction.class.php | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/wcfsetup/install/files/acp/js/WCF.ACP.js b/wcfsetup/install/files/acp/js/WCF.ACP.js index c1ac6408a8..ed2a30cf64 100644 --- a/wcfsetup/install/files/acp/js/WCF.ACP.js +++ b/wcfsetup/install/files/acp/js/WCF.ACP.js @@ -1123,9 +1123,9 @@ WCF.ACP.Package.Search = Class.extend({ */ _prepareInstallation: function(packageUpdateServerID) { var $parameters = { - 'package': { } + 'packages': { } }; - $parameters['package'][this._selectedPackage] = this._selectedPackageVersion; + $parameters['packages'][this._selectedPackage] = this._selectedPackageVersion; if (packageUpdateServerID) { $parameters.authData = { diff --git a/wcfsetup/install/files/lib/data/package/update/PackageUpdateAction.class.php b/wcfsetup/install/files/lib/data/package/update/PackageUpdateAction.class.php index ba0dfe65a4..f6a00163c4 100644 --- a/wcfsetup/install/files/lib/data/package/update/PackageUpdateAction.class.php +++ b/wcfsetup/install/files/lib/data/package/update/PackageUpdateAction.class.php @@ -348,7 +348,9 @@ class PackageUpdateAction extends AbstractDatabaseObjectAction { public function validatePrepareInstallation() { WCF::getSession()->checkPermissions(array('admin.system.package.canInstallPackage')); - $this->readString('package'); + if (!isset($this->parameters['packages']) || !is_array($this->parameters['packages']) || count($this->parameters['packages']) != 1) { + throw new UserInputException('packages'); + } if (isset($this->parameters['authData'])) { if (!is_array($this->parameters['authData'])) { -- 2.20.1