Skip to content

Commit 9c40592

Browse files
author
Tessa Bloomer
committed
Changes suggested
1 parent 021ee79 commit 9c40592

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/onelogin/saml2/response.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -881,11 +881,8 @@ def __normalize_url(self, url):
881881
:rtype: list
882882
"""
883883
try:
884-
parsed = list(urlsplit(url))
885-
#scheme and hostname converted to lowercase
886-
parsed[0] = parsed[0].lower()
887-
parsed[1] = parsed[1].lower()
888-
normalized_url = urlunsplit(parsed)
884+
scheme, netloc, *rest = urlsplit(url)
885+
normalized_url = urlunsplit((scheme.lower(), netloc.lower(), *rest))
889886
return normalized_url
890887
except Exception:
891888
return url

0 commit comments

Comments
 (0)