Commit 6ee313e6 authored by Juan Batiz-Benet's avatar Juan Batiz-Benet

do not accept invalid-start multiaddrs

parent 99196c0d
......@@ -12,6 +12,10 @@ func StringToBytes(s string) ([]byte, error) {
b := []byte{}
sp := strings.Split(s, "/")
if sp[0] != "" {
return nil, fmt.Errorf("invalid multiaddr, must begin with /")
}
// consume first empty elem
sp = sp[1:]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment