Skip to content

Commit 05707bc

Browse files
authored
Merge pull request #268 from cvolny/fix-redirect-schema-case-match
make the redirect scheme matcher case-insensitive.
2 parents ef2efa7 + 53ee46f commit 05707bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/onelogin/saml2/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ def redirect(url, parameters={}, request_data={}):
210210
url = '%s%s' % (OneLogin_Saml2_Utils.get_self_url_host(request_data), url)
211211

212212
# Verify that the URL is to a http or https site.
213-
if re.search('^https?://', url) is None:
213+
if re.search('^https?://', url, flags=re.IGNORECASE) is None:
214214
raise OneLogin_Saml2_Error(
215215
'Redirect to invalid URL: ' + url,
216216
OneLogin_Saml2_Error.REDIRECT_INVALID_URL

0 commit comments

Comments
 (0)