mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 02:44:59 +00:00
Require a valid port that isn't greater than 65,535
This commit is contained in:
parent
99e62dddb4
commit
6537c6c55a
2 changed files with 4 additions and 1 deletions
3
uri.go
3
uri.go
|
|
@ -173,6 +173,9 @@ func parseAddress(address string) (uri *URI, err error) {
|
|||
if err != nil {
|
||||
return nil, errors.New("converting port string to int")
|
||||
}
|
||||
if port > 65535 {
|
||||
return nil, errors.New("port must be in range 0 - 65535")
|
||||
}
|
||||
}
|
||||
uri = &URI{
|
||||
Scheme: scheme,
|
||||
|
|
|
|||
|
|
@ -172,5 +172,5 @@ func validFixture() []uriItem {
|
|||
}
|
||||
|
||||
func invalidFixture() []string {
|
||||
return []string{"foo:bar", "http://foo:", "foo:", ":bar", "http://pilosa.com:129999999999999999999999993", "fd42:4201:f86b:7e09:216:3eff:fefa:ed80"}
|
||||
return []string{"foo:bar", "http://foo:", "foo:", ":bar", "http://pilosa.com:129999999999999999999999993", "fd42:4201:f86b:7e09:216:3eff:fefa:ed80", ":65536"}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue