From 64275425888b6ca4f5ebdfa1a9df814317718290 Mon Sep 17 00:00:00 2001 From: pgjones Date: Sat, 30 Sep 2023 10:17:13 +0100 Subject: [PATCH] Default the PathConverter (and descendants) to be non part isolating This is likely to be the expected for anything that is or extends the PathConverter and by adding it explicitly I hope it will cause less confusion, as seen in a recent issue 2783. Note the PathConverter was already non part isolating due to the BaseConverter check. --- CHANGES.rst | 1 + src/werkzeug/routing/converters.py | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index f9c997dd8..d4eb01e99 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -12,6 +12,7 @@ Unreleased - Add the ``"werkzeug.profiler"`` item to the WSGI ``environ`` dictionary passed to `ProfilerMiddleware`'s `filename_format` function. It contains the ``elapsed`` and ``time`` values for the profiled request. :issue:`2775` +- Explicitly marked the PathConverter as non path isolating. :pr:`2784` Version 2.3.8 diff --git a/src/werkzeug/routing/converters.py b/src/werkzeug/routing/converters.py index eeb5bbd93..ce01dd1ea 100644 --- a/src/werkzeug/routing/converters.py +++ b/src/werkzeug/routing/converters.py @@ -119,6 +119,7 @@ class PathConverter(BaseConverter): :param map: the :class:`Map`. """ + part_isolating = False regex = "[^/].*?" weight = 200