SIGN IN SIGN UP

gh-87389: Fix an open redirection vulnerability in http.server. (GH-93879)

Fix an open redirection vulnerability in the `http.server` module when
an URI path starts with `//` that could produce a 301 Location header
with a misleading target.  Vulnerability discovered, and logic fix
proposed, by Hamza Avvan (@hamzaavvan).

Test and comments authored by Gregory P. Smith [Google].
(cherry picked from commit 4abab6b603dd38bec1168e9a37c40a48ec89508e)

Co-authored-by: Gregory P. Smith <greg@krypto.org>
M
Miss Islington (bot) committed
e2e8847bf52f4a81490653c6d13b7e3821b2c2be
Parent: a1565a8
Committed by GitHub <noreply@github.com> on 6/21/2022, 9:29:03 PM