From f0c11e1f57960125f29edf3339e597804df23b93 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 19 Aug 2020 14:39:22 +0200 Subject: [PATCH] Do not echo loginPassword in PackageUpdateServerEditForm --- .../acp/templates/packageUpdateServerAdd.tpl | 2 +- .../form/PackageUpdateServerEditForm.class.php | 15 +++++++++------ wcfsetup/install/lang/de.xml | 1 + wcfsetup/install/lang/en.xml | 1 + 4 files changed, 12 insertions(+), 7 deletions(-) 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 + -- 2.20.1