From: Tim Düsterhus Date: Wed, 19 Aug 2020 12:39:22 +0000 (+0200) Subject: Do not echo loginPassword in PackageUpdateServerEditForm X-Git-Tag: 5.3.0_Alpha_1~22^2~15 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f0c11e1f57960125f29edf3339e597804df23b93;p=GitHub%2FWoltLab%2FWCF.git Do not echo loginPassword in PackageUpdateServerEditForm --- diff --git a/wcfsetup/install/files/acp/templates/packageUpdateServerAdd.tpl b/wcfsetup/install/files/acp/templates/packageUpdateServerAdd.tpl index f3bffa417d..0f05d99202 100644 --- a/wcfsetup/install/files/acp/templates/packageUpdateServerAdd.tpl +++ b/wcfsetup/install/files/acp/templates/packageUpdateServerAdd.tpl @@ -49,7 +49,7 @@
- + {lang}wcf.acp.updateServer.loginPassword.description{/lang}
diff --git a/wcfsetup/install/files/lib/acp/form/PackageUpdateServerEditForm.class.php b/wcfsetup/install/files/lib/acp/form/PackageUpdateServerEditForm.class.php index 53c5965dbc..7c0d4d15ba 100755 --- a/wcfsetup/install/files/lib/acp/form/PackageUpdateServerEditForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/PackageUpdateServerEditForm.class.php @@ -51,12 +51,16 @@ class PackageUpdateServerEditForm extends PackageUpdateServerAddForm { public function save() { AbstractForm::save(); - // save server - $this->objectAction = new PackageUpdateServerAction([$this->packageUpdateServerID], 'update', ['data' => array_merge($this->additionalFields, [ + $data = [ 'serverURL' => $this->serverURL, - 'loginUsername' => $this->loginUsername, - 'loginPassword' => $this->loginPassword - ])]); + ]; + if ($this->loginUsername != $this->updateServer->loginUsername || $this->loginPassword) { + $data['loginUsername'] = $this->loginUsername; + $data['loginPassword'] = $this->loginPassword; + } + + // save server + $this->objectAction = new PackageUpdateServerAction([$this->packageUpdateServerID], 'update', ['data' => array_merge($this->additionalFields, $data)]); $this->objectAction->executeAction(); $this->saved(); @@ -73,7 +77,6 @@ class PackageUpdateServerEditForm extends PackageUpdateServerAddForm { if (empty($_POST)) { $this->serverURL = $this->updateServer->serverURL; $this->loginUsername = $this->updateServer->loginUsername; - $this->loginPassword = $this->updateServer->loginPassword; } } diff --git a/wcfsetup/install/lang/de.xml b/wcfsetup/install/lang/de.xml index 7a1606133d..77501017c5 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -2777,6 +2777,7 @@ Kein Abschnitt darf leer sein und alle Abschnitten dürfen nur folgende Zeichen + diff --git a/wcfsetup/install/lang/en.xml b/wcfsetup/install/lang/en.xml index f02887f094..7ec9d1dd76 100644 --- a/wcfsetup/install/lang/en.xml +++ b/wcfsetup/install/lang/en.xml @@ -2704,6 +2704,7 @@ If you have already bought the licenses for the listed apps, th +