From 1ccd6a0e1a0dc600566922c119621fda35b63927 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Pablo=20Villaf=C3=A1=C3=B1ez?= Date: Mon, 22 Apr 2024 10:47:48 +0200 Subject: [PATCH 1/2] fix: images can be favorites with index.php-less URLs --- lib/private/Setup.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/private/Setup.php b/lib/private/Setup.php index 52d8bd276048..589b0305bc8f 100644 --- a/lib/private/Setup.php +++ b/lib/private/Setup.php @@ -502,7 +502,9 @@ public static function updateHtaccess() { $content .= "\n RewriteRule ^favicon.ico$ core/img/favicon.ico [L]"; $content .= "\n RewriteRule ^core/js/oc.js$ index.php [PT,E=PATH_INFO:$1]"; $content .= "\n RewriteRule ^core/preview.png$ index.php [PT,E=PATH_INFO:$1]"; - $content .= "\n RewriteCond %{REQUEST_URI} !\\.(css|js|svg|gif|png|html|ttf|woff|ico|jpg|jpeg|json|properties)$"; + $content .= "\n RewriteCond %{REQUEST_URI} \\.(css|js|svg|gif|png|html|ttf|woff|ico|jpg|jpeg|json|properties)$"; + $content .= "\n RewriteCond %{REQUEST_METHOD} GET"; + $content .= "\n RewriteRule . - [L,E=PATH_INFO:$1]"; $content .= "\n RewriteCond %{REQUEST_URI} !\\.(min|js|auto)\\.map$"; $content .= "\n RewriteCond %{REQUEST_URI} !^$rewriteBaseRe/core/img/favicon\\.ico$"; $content .= "\n RewriteCond %{REQUEST_URI} !^$rewriteBaseRe/robots\\.txt$"; From 2354afb477a8c3e8b5a0098e5a5242e4c4e5bb1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Pablo=20Villaf=C3=A1=C3=B1ez?= Date: Mon, 22 Apr 2024 12:27:41 +0200 Subject: [PATCH 2/2] chore: add changelog entry --- changelog/unreleased/41236 | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 changelog/unreleased/41236 diff --git a/changelog/unreleased/41236 b/changelog/unreleased/41236 new file mode 100644 index 000000000000..34fa488bcd8d --- /dev/null +++ b/changelog/unreleased/41236 @@ -0,0 +1,5 @@ +Bugfix: Allow images to be tagged as favorites in index.php-less URLs + +There was a bug preventing images to be tagged as favorites. This is fixed now. + +https://github.com/owncloud/core/pull/41236