Skip to content

Commit

Permalink
[PR aio-libs#7701/312f747d backport][3.9] Require full version and me…
Browse files Browse the repository at this point in the history
…thod regex matches (aio-libs#7703)

**This is a backport of PR aio-libs#7701 as merged into master
(312f747).**

These changes ensure that HTTP versions and methods fully match the
regular expressions for those constructs. AIOHTTP currently only applies
prefix-matching, which I assume was unintentional.

There should be no observable changes to the user, unless they use HTTP
servers/clients that generate very malformed request lines. Such
clients/servers are unlikely to exist because most other web servers
reject these malformed messages.

Fixes aio-libs#7700

Co-authored-by: Ben Kallus <49924171+kenballus@users.noreply.github.com>
  • Loading branch information
2 people authored and Xiang Li committed Dec 4, 2023
1 parent 1aa683f commit 25aa5b0
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 300 deletions.
1 change: 1 addition & 0 deletions CHANGES/7700.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix issue with insufficient HTTP method and version validation.
Loading

0 comments on commit 25aa5b0

Please sign in to comment.