diff options
author | Vincent Petry <vincent@nextcloud.com> | 2023-01-11 14:40:10 +0100 |
---|---|---|
committer | Vincent Petry <vincent@nextcloud.com> | 2023-01-13 10:27:17 +0100 |
commit | 4e179e0e07c848e3dcb31d1214a2516181e47d45 (patch) | |
tree | 6e3180422675f41e763e59b70a7dae7709336c24 /apps/files_external | |
parent | a0f70988f426aa3c327c95537f3e62bae2461707 (diff) | |
download | nextcloud-server-4e179e0e07c848e3dcb31d1214a2516181e47d45.tar.gz nextcloud-server-4e179e0e07c848e3dcb31d1214a2516181e47d45.zip |
Enable SSL by default in ext storage configs
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Diffstat (limited to 'apps/files_external')
-rw-r--r-- | apps/files_external/lib/Lib/Backend/AmazonS3.php | 3 | ||||
-rw-r--r-- | apps/files_external/lib/Lib/Backend/DAV.php | 3 | ||||
-rw-r--r-- | apps/files_external/lib/Lib/Backend/FTP.php | 3 | ||||
-rw-r--r-- | apps/files_external/lib/Lib/Backend/OwnCloud.php | 3 | ||||
-rw-r--r-- | apps/files_external/tests/DefinitionParameterTest.php | 1 |
5 files changed, 9 insertions, 4 deletions
diff --git a/apps/files_external/lib/Lib/Backend/AmazonS3.php b/apps/files_external/lib/Lib/Backend/AmazonS3.php index 26da263f094..aae0def2b46 100644 --- a/apps/files_external/lib/Lib/Backend/AmazonS3.php +++ b/apps/files_external/lib/Lib/Backend/AmazonS3.php @@ -48,7 +48,8 @@ class AmazonS3 extends Backend { (new DefinitionParameter('region', $l->t('Region'))) ->setFlag(DefinitionParameter::FLAG_OPTIONAL), (new DefinitionParameter('use_ssl', $l->t('Enable SSL'))) - ->setType(DefinitionParameter::VALUE_BOOLEAN), + ->setType(DefinitionParameter::VALUE_BOOLEAN) + ->setDefaultValue(true), (new DefinitionParameter('use_path_style', $l->t('Enable Path Style'))) ->setType(DefinitionParameter::VALUE_BOOLEAN), (new DefinitionParameter('legacy_auth', $l->t('Legacy (v2) authentication'))) diff --git a/apps/files_external/lib/Lib/Backend/DAV.php b/apps/files_external/lib/Lib/Backend/DAV.php index cf16677334d..71c97e639ff 100644 --- a/apps/files_external/lib/Lib/Backend/DAV.php +++ b/apps/files_external/lib/Lib/Backend/DAV.php @@ -43,7 +43,8 @@ class DAV extends Backend { (new DefinitionParameter('root', $l->t('Remote subfolder'))) ->setFlag(DefinitionParameter::FLAG_OPTIONAL), (new DefinitionParameter('secure', $l->t('Secure https://'))) - ->setType(DefinitionParameter::VALUE_BOOLEAN), + ->setType(DefinitionParameter::VALUE_BOOLEAN) + ->setDefaultValue(true), ]) ->addAuthScheme(AuthMechanism::SCHEME_PASSWORD) ->setLegacyAuthMechanism($legacyAuth) diff --git a/apps/files_external/lib/Lib/Backend/FTP.php b/apps/files_external/lib/Lib/Backend/FTP.php index 587f3e68535..d7c6e3bebd6 100644 --- a/apps/files_external/lib/Lib/Backend/FTP.php +++ b/apps/files_external/lib/Lib/Backend/FTP.php @@ -43,7 +43,8 @@ class FTP extends Backend { (new DefinitionParameter('root', $l->t('Remote subfolder'))) ->setFlag(DefinitionParameter::FLAG_OPTIONAL), (new DefinitionParameter('secure', $l->t('Secure ftps://'))) - ->setType(DefinitionParameter::VALUE_BOOLEAN), + ->setType(DefinitionParameter::VALUE_BOOLEAN) + ->setDefaultValue(true), ]) ->addAuthScheme(AuthMechanism::SCHEME_PASSWORD) ->setLegacyAuthMechanism($legacyAuth) diff --git a/apps/files_external/lib/Lib/Backend/OwnCloud.php b/apps/files_external/lib/Lib/Backend/OwnCloud.php index 8b33b98b5c4..97297b6a977 100644 --- a/apps/files_external/lib/Lib/Backend/OwnCloud.php +++ b/apps/files_external/lib/Lib/Backend/OwnCloud.php @@ -41,7 +41,8 @@ class OwnCloud extends Backend { (new DefinitionParameter('root', $l->t('Remote subfolder'))) ->setFlag(DefinitionParameter::FLAG_OPTIONAL), (new DefinitionParameter('secure', $l->t('Secure https://'))) - ->setType(DefinitionParameter::VALUE_BOOLEAN), + ->setType(DefinitionParameter::VALUE_BOOLEAN) + ->setDefaultValue(true), ]) ->addAuthScheme(AuthMechanism::SCHEME_PASSWORD) ->setLegacyAuthMechanism($legacyAuth) diff --git a/apps/files_external/tests/DefinitionParameterTest.php b/apps/files_external/tests/DefinitionParameterTest.php index 72e8c013730..04d5f6762c5 100644 --- a/apps/files_external/tests/DefinitionParameterTest.php +++ b/apps/files_external/tests/DefinitionParameterTest.php @@ -47,6 +47,7 @@ class DefinitionParameterTest extends \Test\TestCase { $param->setType(Param::VALUE_PASSWORD); $param->setFlag(Param::FLAG_OPTIONAL); + $param->setDefaultValue(null); $this->assertEquals([ 'value' => 'bar', 'flags' => Param::FLAG_OPTIONAL, |