mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 00:32:29 -04:00
Merge pull request #31492 from nextcloud/fix/check-secret-configured
This commit is contained in:
commit
036f871d01
2 changed files with 10 additions and 1 deletions
2
.github/workflows/s3-external.yml
vendored
2
.github/workflows/s3-external.yml
vendored
|
|
@ -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', 'passwordsalt' => '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
|
||||
|
|
|
|||
|
|
@ -736,6 +736,15 @@ class OC_Util {
|
|||
];
|
||||
}
|
||||
|
||||
foreach (['secret', 'instanceid', 'passwordsalt'] as $requiredConfig) {
|
||||
if ($config->getValue($requiredConfig, '') === '' && !\OC::$CLI && $config->getValue('installed', false)) {
|
||||
$errors[] = [
|
||||
'error' => $l->t('The required \'' . $requiredConfig . '\' 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
|
||||
|
|
|
|||
Loading…
Reference in a new issue