FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Merge pull request #64 from MarzyCoder/patch-1 · python-webuntis/python-webuntis@1ef4733 · GitHub

Commit 1ef4733

Browse files
authored
Merge pull request #64 from MarzyCoder/patch-1
Fix regex for valid hostname check
2 parents 470c629 + 6633b01 commit 1ef4733

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎webuntis/utils/userinput.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def server(url):
2323
# urlparse failed
2424
raise ValueError('Not a valid URL or hostname')
2525

26-
if not re.match(r'^[a-zA-Z0-9.:-_]+$', urlobj.netloc):
26+
if not re.match(r'^[a-zA-Z0-9.:\-_]+$', urlobj.netloc):
2727
# That's not even a valid hostname
2828
raise ValueError('Not a valid hostname')
2929

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL