Commit d946edf
Fix: Strict mode to enforce FQDN (#65)
* Fix: Strict mode to enforce FQDN
Go docs:
https://golang.org/pkg/net/url/#Parse
> Trying to parse a hostname and path without a scheme is invalid but may not necessarily return an error, due to parsing ambiguities.
```
fqdnURL, err := url.Parse(*myFqdn)
if err != nil {
c.handleErr(request, client, err)
return
}
```
Example:
myFqdn was set to `b607b847b180`, scheme is missing, but no error (as mentioned in the docs).
We don't need to treat myFqdn as URL since it is not an URL but rather FQDN (which is schemaless)1 parent c710c40 commit d946edf
1 file changed
Lines changed: 2 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
| 107 | + | |
113 | 108 | | |
114 | 109 | | |
115 | 110 | | |
| |||
225 | 220 | | |
226 | 221 | | |
227 | 222 | | |
| 223 | + | |
228 | 224 | | |
229 | 225 | | |
230 | 226 | | |
| |||
0 commit comments