diff options
author | Robin Appelman <robin@icewind.nl> | 2020-03-12 19:45:23 +0100 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2020-03-12 19:45:23 +0100 |
commit | 0d112d7901983a568f6a803f59f240afd434db61 (patch) | |
tree | f5e89f7532e42ed660efda197693a5745085906a /apps/files_external/lib/Service | |
parent | 24d0fb9fcd8b190b6c16c4608c95785036b1eb31 (diff) | |
download | nextcloud-server-0d112d7901983a568f6a803f59f240afd434db61.tar.gz nextcloud-server-0d112d7901983a568f6a803f59f240afd434db61.zip |
Use placeholder values for password fields in external storage webui
This prevents the password from being sent to the webui.
While an admin will always be able to retrieve the passwords (as they
can do arbitrairy code execution by design) this prevents casual
password snooping
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/files_external/lib/Service')
-rw-r--r-- | apps/files_external/lib/Service/StoragesService.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/files_external/lib/Service/StoragesService.php b/apps/files_external/lib/Service/StoragesService.php index 61c011a1517..60ccec13206 100644 --- a/apps/files_external/lib/Service/StoragesService.php +++ b/apps/files_external/lib/Service/StoragesService.php @@ -36,6 +36,7 @@ use OCA\Files_External\Lib\Auth\AuthMechanism; use OCA\Files_External\Lib\Auth\InvalidAuth; use OCA\Files_External\Lib\Backend\Backend; use OCA\Files_External\Lib\Backend\InvalidBackend; +use OCA\Files_External\Lib\DefinitionParameter; use OCA\Files_External\Lib\StorageConfig; use OCA\Files_External\NotFoundException; use OCP\Files\Config\IUserMountCache; @@ -427,7 +428,9 @@ abstract class StoragesService { $changedOptions = array_diff_assoc($updatedStorage->getMountOptions(), $oldStorage->getMountOptions()); foreach ($changedConfig as $key => $value) { - $this->dbConfig->setConfig($id, $key, $value); + if ($value !== DefinitionParameter::UNMODIFIED_PLACEHOLDER) { + $this->dbConfig->setConfig($id, $key, $value); + } } foreach ($changedOptions as $key => $value) { $this->dbConfig->setOption($id, $key, $value); |