From 0b272d076d22e55e1cd94611346f4971a8c0db86 Mon Sep 17 00:00:00 2001 From: Michael Lazar Date: Thu, 26 Mar 2020 15:48:44 -0400 Subject: [PATCH] Use re.fullmatch() for route patterns --- CHANGELOG.md | 10 +++++----- jetforce.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 13ffb3d..f27d036 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,14 +2,14 @@ ### Unreleased -- Allow virtual hosting by specifying an alternate hostname in the application - route pattern. +- A hostname can now be specified in route patterns, to facilitate virtual + hosting on a single jetforce server. +- Route patterns now use ``re.fullmatch()`` and will no longer trigger on + partial matches. - Jetforce will no longer raise an exception when attempting to log dropped connections or other malformed requests. - Added the following CGI variables for client certificates: - - TLS_CLIENT_NOT_BEFORE - - TLS_CLIENT_NOT_AFTER - - TLS_CLIENT_SERIAL_NUMBER + TLS_CLIENT_NOT_BEFORE, TLS_CLIENT_NOT_AFTER, TLS_CLIENT_SERIAL_NUMBER ### v0.2.0 (2012-01-21) diff --git a/jetforce.py b/jetforce.py index 5c1536e..bdcbe99 100755 --- a/jetforce.py +++ b/jetforce.py @@ -181,7 +181,7 @@ class RoutePattern: else: request_path = request.path.rstrip("/") - return bool(re.match(self.path, request_path)) + return bool(re.fullmatch(self.path, request_path)) class JetforceApplication: