Compare commits

...

3 commits

Author SHA1 Message Date
nextcloud-command
fa9e1d7966 Update psalm baseline
Signed-off-by: GitHub <noreply@github.com>
2025-12-13 04:22:50 +00:00
Simon L.
7c57a3f702
Merge pull request #7304 from nextcloud/enh/noid/fix-config-of-bundle-path
Some checks failed
Codespell / Check spelling (push) Has been cancelled
Docker Lint / docker-lint (push) Has been cancelled
Shellcheck / Check Shell (push) Has been cancelled
nextcloud: fix configuration of `default_certificates_bundle_path` and allow to use bundle for mailer
2025-12-12 16:10:45 +01:00
Simon L.
17bf4f91d7 nextcloud: fix configuration of default_certificates_bundle_path and allow to use bundle for mailer
Signed-off-by: Simon L. <szaimen@e.mail.de>
2025-12-12 16:08:31 +01:00
4 changed files with 17 additions and 14 deletions

View file

@ -0,0 +1,5 @@
<?php
// Check if NEXTCLOUD_TRUSTED_CERTIFICATES_ are configured
if (str_contains(implode(' ', array_keys(getenv())), 'NEXTCLOUD_TRUSTED_CERTIFICATES_')) {
$CONFIG['default_certificates_bundle_path'] = '/var/www/html/data/certificates/ca-bundle.crt';
}

View file

@ -18,3 +18,14 @@ if (getenv('SMTP_HOST') && getenv('MAIL_FROM_ADDRESS') && getenv('MAIL_DOMAIN'))
$CONFIG['mail_smtppassword'] = '';
}
}
if (getenv('NEXTCLOUD_TRUSTED_CERTIFICATES_MAILER')) {
$CONFIG = array(
'mail_smtpstreamoptions' => array(
'ssl' => array(
'verify_peer_name' => false,
'cafile' => '/var/www/html/data/certificates/ca-bundle.crt',
)
)
);
}

View file

@ -20,13 +20,6 @@ run_upgrade_if_needed_due_to_app_update() {
fi
}
set_global_ca_bundle_path() {
# Only run if env is set
if env | grep -q NEXTCLOUD_TRUSTED_CERTIFICATES_; then
php /var/www/html/occ config:system:set default_certificates_bundle_path --value="$CERTIFICATE_BUNDLE"
fi
}
# Create cert bundle
if env | grep -q NEXTCLOUD_TRUSTED_CERTIFICATES_; then
@ -246,8 +239,6 @@ if ! [ -f "$NEXTCLOUD_DATA_DIR/skip.update" ]; then
run_upgrade_if_needed_due_to_app_update
set_global_ca_bundle_path
php /var/www/html/occ maintenance:mode --off
echo "Getting and backing up the status of apps for later; this might take a while..."
@ -381,8 +372,6 @@ EOF
# Try to force generation of appdata dir:
php /var/www/html/occ maintenance:repair
set_global_ca_bundle_path
if [ -z "$OBJECTSTORE_S3_BUCKET" ] && [ -z "$OBJECTSTORE_SWIFT_URL" ]; then
max_retries=10
try=0
@ -599,8 +588,6 @@ fi
run_upgrade_if_needed_due_to_app_update
set_global_ca_bundle_path
if [ -z "$OBJECTSTORE_S3_BUCKET" ] && [ -z "$OBJECTSTORE_SWIFT_URL" ]; then
# Check if appdata is present
# If not, something broke (e.g. changing ncdatadir after aio was first started)

View file

@ -1,2 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="6.14.1@cf26e6debc366836754f359ece5b68629a1ee185"/>
<files psalm-version="6.14.2@bbd217fc98c0daa0a13aea2a7f119d03ba3fc9a0"/>