Commit 0386f33
Fix valid domain regex (#57)
* Fix valid domain regex Based on https://gist.github.com/dperini/729294 Stripped the following checks: - protocol (http, ftp) - short syntax (//) - basic auth (user:pass) - requirement for TLD (\. made optional) - port number (:port) - resource path (/path, #resource-path) * Revert Regex to just support localhost * Prevent matching only a few octets of the ip https://regexr.com/56tso * Add ipv4 regex * Add error for ip addresses * Add missing } Co-authored-by: Jeremy Albright <1935258+Js-Brecht@users.noreply.github.com> Co-authored-by: Jeremy Albright <1935258+Js-Brecht@users.noreply.github.com>1 parent e138968 commit 0386f33
2 files changed
+8
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
77 | 78 | | |
78 | 79 | | |
79 | 80 | | |
80 | | - | |
| 81 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
66 | 67 | | |
67 | 68 | | |
68 | 69 | | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
69 | 73 | | |
70 | 74 | | |
71 | 75 | | |
| |||
0 commit comments