From: Tim Düsterhus Date: Wed, 19 Aug 2020 12:44:11 +0000 (+0200) Subject: Disallow changing the package update server URL X-Git-Tag: 5.3.0_Alpha_1~22^2~13 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=da8e52fbdafb6ec65d99c03fe2c5f8fc3dac7921;p=GitHub%2FWoltLab%2FWCF.git Disallow changing the package update server URL --- diff --git a/wcfsetup/install/files/acp/templates/packageUpdateServerAdd.tpl b/wcfsetup/install/files/acp/templates/packageUpdateServerAdd.tpl index 0f05d99202..e3fa427145 100644 --- a/wcfsetup/install/files/acp/templates/packageUpdateServerAdd.tpl +++ b/wcfsetup/install/files/acp/templates/packageUpdateServerAdd.tpl @@ -25,7 +25,7 @@
- + {if $errorField == 'serverURL'} {if $errorType == 'empty'} diff --git a/wcfsetup/install/files/lib/acp/form/PackageUpdateServerEditForm.class.php b/wcfsetup/install/files/lib/acp/form/PackageUpdateServerEditForm.class.php index 7c0d4d15ba..7da86b669b 100755 --- a/wcfsetup/install/files/lib/acp/form/PackageUpdateServerEditForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/PackageUpdateServerEditForm.class.php @@ -51,9 +51,7 @@ class PackageUpdateServerEditForm extends PackageUpdateServerAddForm { public function save() { AbstractForm::save(); - $data = [ - 'serverURL' => $this->serverURL, - ]; + $data = []; if ($this->loginUsername != $this->updateServer->loginUsername || $this->loginPassword) { $data['loginUsername'] = $this->loginUsername; $data['loginPassword'] = $this->loginPassword; @@ -74,8 +72,8 @@ class PackageUpdateServerEditForm extends PackageUpdateServerAddForm { public function readData() { parent::readData(); + $this->serverURL = $this->updateServer->serverURL; if (empty($_POST)) { - $this->serverURL = $this->updateServer->serverURL; $this->loginUsername = $this->updateServer->loginUsername; } }