Use re.fullmatch() for route patterns

This commit is contained in:
Michael Lazar 2020-03-26 15:48:44 -04:00
parent 58d34db29d
commit 0b272d076d
2 changed files with 6 additions and 6 deletions

View File

@ -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)

View File

@ -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: