From 39c39a0f609a6cef769e761b53f300589ff455db Mon Sep 17 00:00:00 2001 From: Maxence Lange Date: Mon, 2 Oct 2023 14:38:10 -0100 Subject: [PATCH 1/2] fix ocm-provider rewrite rules Signed-off-by: Maxence Lange --- .htaccess | 1 + lib/private/Setup.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.htaccess b/.htaccess index 7a8f41886aca9..2be3c1b9e15a1 100644 --- a/.htaccess +++ b/.htaccess @@ -90,6 +90,7 @@ RewriteRule ^remote/(.*) remote.php [QSA,L] RewriteRule ^(?:build|tests|config|lib|3rdparty|templates)/.* - [R=404,L] RewriteRule ^\.well-known/(?!acme-challenge|pki-validation) /index.php [QSA,L] + RewriteRule ^ocm-provider /index.php [QSA,L] RewriteRule ^(?:\.(?!well-known)|autotest|occ|issue|indie|db_|console).* - [R=404,L] diff --git a/lib/private/Setup.php b/lib/private/Setup.php index 0993fe54f4708..f167d19adebb0 100644 --- a/lib/private/Setup.php +++ b/lib/private/Setup.php @@ -537,7 +537,7 @@ public static function updateHtaccess() { $content .= "\n RewriteCond %{REQUEST_FILENAME} !/(cron|public|remote|status)\\.php"; $content .= "\n RewriteCond %{REQUEST_FILENAME} !/ocs/v(1|2)\\.php"; $content .= "\n RewriteCond %{REQUEST_FILENAME} !/robots\\.txt"; - $content .= "\n RewriteCond %{REQUEST_FILENAME} !/(ocm-provider|ocs-provider|updater)/"; + $content .= "\n RewriteCond %{REQUEST_FILENAME} !/(ocs-provider|updater)/"; $content .= "\n RewriteCond %{REQUEST_URI} !^/\\.well-known/(acme-challenge|pki-validation)/.*"; $content .= "\n RewriteCond %{REQUEST_FILENAME} !/richdocumentscode(_arm64)?/proxy.php$"; $content .= "\n RewriteRule . index.php [PT,E=PATH_INFO:$1]"; From a250250985e6517c1c3a1cc7cd28008948353cb3 Mon Sep 17 00:00:00 2001 From: Maxence Lange Date: Tue, 3 Oct 2023 14:19:44 -0100 Subject: [PATCH 2/2] Update .htaccess Co-authored-by: Benjamin Gaussorgues Signed-off-by: Maxence Lange --- .htaccess | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.htaccess b/.htaccess index 2be3c1b9e15a1..52caeaf70d42d 100644 --- a/.htaccess +++ b/.htaccess @@ -90,7 +90,7 @@ RewriteRule ^remote/(.*) remote.php [QSA,L] RewriteRule ^(?:build|tests|config|lib|3rdparty|templates)/.* - [R=404,L] RewriteRule ^\.well-known/(?!acme-challenge|pki-validation) /index.php [QSA,L] - RewriteRule ^ocm-provider /index.php [QSA,L] + RewriteRule ^ocm-provider/?$ /index.php [QSA,L] RewriteRule ^(?:\.(?!well-known)|autotest|occ|issue|indie|db_|console).* - [R=404,L]