mirror of
https://github.com/logos-messaging/go-multiaddr.git
synced 2026-01-02 13:03:11 +00:00
fix broken validation
This commit is contained in:
parent
04300cfb45
commit
ac6bfc1dd2
@ -10,7 +10,7 @@ import (
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
mh "github.com/multiformats/go-multihash"
|
||||
mh "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash"
|
||||
)
|
||||
|
||||
type Transcoder interface {
|
||||
@ -241,8 +241,8 @@ func garlic64BtS(b []byte) (string, error) {
|
||||
}
|
||||
|
||||
func garlicValidate(b []byte) error {
|
||||
if len(b) > 516 || len(b) < 616 {
|
||||
return fmt.Errorf("failed to parse garlic addr: %s not an i2p base64 address. len: %d\n", b, len(b))
|
||||
if len(b) < 386 {
|
||||
return fmt.Errorf("failed to validate garlic addr: %s not an i2p base64 address. len: %d\n", b, len(b))
|
||||
}
|
||||
s, err := garlic64BtS(b)
|
||||
if err != nil {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user