Skip to content

Commit 6766c52

Browse files
authored
Merge pull request #54 from colinjeanne/host-underscores
Allows underscores in URL hosts
2 parents c45c0f8 + fa2593d commit 6766c52

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
@@ -33,7 +33,7 @@
3333
# Released under a BSD 3-Clause License
3434
url_regex = re.compile(
3535
r'^(?:[a-z0-9\.\-]*)://' # scheme is validated separately
36-
r'(?:(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+(?:[A-Z]{2,6}\.?|[A-Z0-9-]{2,}\.?)|' # domain...
36+
r'(?:(?:[A-Z0-9_](?:[A-Z0-9-_]{0,61}[A-Z0-9_])?\.)+(?:[A-Z]{2,6}\.?|[A-Z0-9-]{2,}\.?)|' # domain...
3737
r'localhost|' # localhost...
3838
r'\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|' # ...or ipv4
3939
r'\[?[A-F0-9]*:[A-F0-9:]+\]?)' # ...or ipv6

0 commit comments

Comments
 (0)