summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/s3-external.yml2
-rw-r--r--lib/private/legacy/OC_Util.php7
-rwxr-xr-xtests/travis/install.sh4
3 files changed, 12 insertions, 1 deletions
diff --git a/.github/workflows/s3-external.yml b/.github/workflows/s3-external.yml
index dedab6b0c16..a1d4dcbda22 100644
--- a/.github/workflows/s3-external.yml
+++ b/.github/workflows/s3-external.yml
@@ -55,7 +55,7 @@ jobs:
php -S localhost:8080 &
- name: PHPUnit
run: |
- echo "<?php return ['run' => true,'hostname' => 'localhost','key' => 'minio','secret' => 'minio123', 'bucket' => 'bucket', 'port' => 9000, 'use_ssl' => false, 'autocreate' => true, 'use_path_style' => true];" > apps/${{ env.APP_NAME }}/tests/config.amazons3.php
+ echo "<?php return ['run' => true, 'secret' => 'actually-not-secret', 'hostname' => 'localhost','key' => 'minio','secret' => 'minio123', 'bucket' => 'bucket', 'port' => 9000, 'use_ssl' => false, 'autocreate' => true, 'use_path_style' => true];" > apps/${{ env.APP_NAME }}/tests/config.amazons3.php
phpunit --configuration tests/phpunit-autotest-external.xml apps/files_external/tests/Storage/Amazons3Test.php
phpunit --configuration tests/phpunit-autotest-external.xml apps/files_external/tests/Storage/VersionedAmazonS3Test.php
- name: S3 logs
diff --git a/lib/private/legacy/OC_Util.php b/lib/private/legacy/OC_Util.php
index 9110678537f..5441d3a2864 100644
--- a/lib/private/legacy/OC_Util.php
+++ b/lib/private/legacy/OC_Util.php
@@ -969,6 +969,13 @@ class OC_Util {
];
}
+ if ($config->getValue('secret', '') === '' && !\OC::$CLI) {
+ $errors[] = [
+ 'error' => $l->t('The required \'secret\' config variable is not configued in the config.php file.'),
+ 'hint' => $l->t('Please ask your server administrator to check the Nextcloud configuration.')
+ ];
+ }
+
$errors = array_merge($errors, self::checkDatabaseVersion());
// Cache the result of this function
diff --git a/tests/travis/install.sh b/tests/travis/install.sh
index 180e0c634da..c0c850fe569 100755
--- a/tests/travis/install.sh
+++ b/tests/travis/install.sh
@@ -44,6 +44,7 @@ echo "Using database $DATABASENAME"
cat > ./tests/autoconfig-sqlite.php <<DELIM
<?php
\$AUTOCONFIG = array (
+ 'secret' => 'actually-not-secret',
'installed' => false,
'dbtype' => 'sqlite',
'dbtableprefix' => 'oc_',
@@ -56,6 +57,7 @@ DELIM
cat > ./tests/autoconfig-mysql.php <<DELIM
<?php
\$AUTOCONFIG = array (
+ 'secret' => 'actually-not-secret',
'installed' => false,
'dbtype' => 'mysql',
'dbtableprefix' => 'oc_',
@@ -72,6 +74,7 @@ DELIM
cat > ./tests/autoconfig-pgsql.php <<DELIM
<?php
\$AUTOCONFIG = array (
+ 'secret' => 'actually-not-secret',
'installed' => false,
'dbtype' => 'pgsql',
'dbtableprefix' => 'oc_',
@@ -88,6 +91,7 @@ DELIM
cat > ./tests/autoconfig-oracle.php <<DELIM
<?php
\$AUTOCONFIG = array (
+ 'secret' => 'actually-not-secret',
'installed' => false,
'dbtype' => 'oci',
'dbtableprefix' => 'oc_',