Skip to content

Commit 37edd00

Browse files
authored
Allows underscores in URL hosts
1 parent c3019b9 commit 37edd00

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/onelogin/saml2/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
# Released under a BSD 3-Clause License
2626
url_regex = re.compile(
2727
r'^(?:[a-z0-9\.\-]*)://' # scheme is validated separately
28-
r'(?:(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+(?:[A-Z]{2,6}\.?|[A-Z0-9-]{2,}\.?)|' # domain...
28+
r'(?:(?:[A-Z0-9_](?:[A-Z0-9-_]{0,61}[A-Z0-9_])?\.)+(?:[A-Z]{2,6}\.?|[A-Z0-9-]{2,}\.?)|' # domain...
2929
r'localhost|' # localhost...
3030
r'\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|' # ...or ipv4
3131
r'\[?[A-F0-9]*:[A-F0-9:]+\]?)' # ...or ipv6

0 commit comments

Comments
 (0)