Skip to content

Commit 7d58f12

Browse files
authored
Merge pull request #220 from WinterFramework/fix-newline-bug
UUID query parameter newline character bug fixed
2 parents b7c9788 + 2ebd214 commit 7d58f12

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [9.6.1] - 2022-07-04
8+
9+
Return 400 Bad Request instead of 500 if UUID request parameter has a newline character in the end
10+
711
## [9.6.0] - 2022-06-22
812

913
Return 400 Bad Request instead of 500 if UUID request parameter is malformed

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "winter"
3-
version = "9.6.0"
3+
version = "9.6.1"
44
homepage = "https://github.com/WinterFramework/winter"
55
description = "Web Framework inspired by Spring Framework"
66
authors = ["Alexander Egorov <[email protected]>"]

winter/core/json/decoder.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
_decoders = {}
2626

2727
Item = TypeVar('Item')
28-
uuid_regexp = re.compile(r'^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$')
28+
uuid_regexp = re.compile(r'^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\Z')
2929

3030

3131
class _MissingException(Exception):

0 commit comments

Comments
 (0)