From ec3cee89d31ca21c7377cac384cf13f5c9c1a494 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Thu, 15 Dec 2022 11:33:31 +0000 Subject: [PATCH] fstest: switch to port forwarding now Owncloud disallows wildcards A recent security fix in the Owncloud container now causes it to disallow wildcards in the OWNCLOUD_TRUSTED_DOMAINS setting. This patch works around the problem by using port forwarding from the host so we can keep the domain name constant. --- fstest/testserver/init.d/TestWebdavOwncloud | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/fstest/testserver/init.d/TestWebdavOwncloud b/fstest/testserver/init.d/TestWebdavOwncloud index c12cb2259..41c40d947 100755 --- a/fstest/testserver/init.d/TestWebdavOwncloud +++ b/fstest/testserver/init.d/TestWebdavOwncloud @@ -5,6 +5,7 @@ set -e NAME=owncloud USER=rclone PASS=HarperGrayerFewest5 +PORT=38081 . $(dirname "$0")/docker.bash @@ -17,15 +18,16 @@ start() { -e "OWNCLOUD_ADMIN_PASSWORD=$PASS" \ -e "OWNCLOUD_MYSQL_UTF8MB4=true" \ -e "OWNCLOUD_REDIS_ENABLED=false" \ - -e "OWNCLOUD_TRUSTED_DOMAINS=*.*.*.*" \ + -e "OWNCLOUD_TRUSTED_DOMAINS=127.0.0.1" \ + -p 127.0.0.1:${PORT}:8080 \ owncloud/server echo type=webdav - echo url=http://$(docker_ip):8080/remote.php/webdav/ + echo url=http://127.0.0.1:${PORT}/remote.php/webdav/ echo user=$USER echo pass=$(rclone obscure $PASS) echo vendor=owncloud - echo _connect=$(docker_ip):8080 + echo _connect=127.0.0.1:${PORT} } . $(dirname "$0")/run.bash