From e7908c6c12953167c8db39784c3b8e454f625ff3 Mon Sep 17 00:00:00 2001 From: Jan Max Meyer Date: Thu, 27 Jul 2023 14:59:45 +0200 Subject: [PATCH 1/2] fix(seo): Incoming url is compared wrong (#801) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This worked in cases when there is no escaped character, but e.g. with 'w%C3%A4rme' (german word "wärme"), the incoming URL '/page/w%C3%A4rme' is compared to a lower-cased seoUrl containing '/page/w%c3%a4rme', which redirects wrong. --- core/prototypes/list.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/prototypes/list.py b/core/prototypes/list.py index 16077e041..a0e9d3858 100644 --- a/core/prototypes/list.py +++ b/core/prototypes/list.py @@ -310,7 +310,7 @@ def index(self, *args, **kwargs) -> Any: seoUrl = utils.seoUrlToEntry(self.moduleName, skel) # Check whether this is the current seo-key, otherwise redirect to it - if current.request.get().request.path != seoUrl: + if current.request.get().request.path.lower() != seoUrl: raise errors.Redirect(seoUrl, status=301) self.onView(skel) return self.render.view(skel) From 8052d25d9ddf56c7204e6ead8e9296d5986e5eaf Mon Sep 17 00:00:00 2001 From: Jan Max Meyer Date: Thu, 27 Jul 2023 15:02:34 +0200 Subject: [PATCH 2/2] Bump version 3.4.6 --- CHANGELOG.md | 4 ++++ core/version.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 47d29c20f..b24d19f1d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ This file documents any relevant changes done to ViUR-core since version 3.0.0. +## [3.4.6] + +- fix(seo): Incoming url is compared wrong (#801) + ## [3.4.5] - fix: Add missing fallback for `NumericBone.refresh()` destroying valid data (#793) diff --git a/core/version.py b/core/version.py index 0b73d7249..2f2bf0f66 100644 --- a/core/version.py +++ b/core/version.py @@ -3,7 +3,7 @@ # This will mark it as a pre-release as well on PyPI. # See CONTRIBUTING.md for further information. -__version__ = "3.4.5" +__version__ = "3.4.6" assert __version__.count(".") >= 2 and "".join(__version__.split(".", 3)[:3]).isdigit(), \ "Semantic __version__ expected!"