fix broken validation

This commit is contained in:
idk 2018-12-15 01:44:59 -05:00
parent 04300cfb45
commit ac6bfc1dd2
No known key found for this signature in database
GPG Key ID: D75C03B39B5E14E1

View File

@ -10,7 +10,7 @@ import (
"strconv" "strconv"
"strings" "strings"
mh "github.com/multiformats/go-multihash" mh "gx/ipfs/QmerPMzPk1mJVowm8KgmoknWa4yCYvvugMPsgWmDNUvDLW/go-multihash"
) )
type Transcoder interface { type Transcoder interface {
@ -241,8 +241,8 @@ func garlic64BtS(b []byte) (string, error) {
} }
func garlicValidate(b []byte) error { func garlicValidate(b []byte) error {
if len(b) > 516 || len(b) < 616 { if len(b) < 386 {
return fmt.Errorf("failed to parse garlic addr: %s not an i2p base64 address. len: %d\n", b, len(b)) return fmt.Errorf("failed to validate garlic addr: %s not an i2p base64 address. len: %d\n", b, len(b))
} }
s, err := garlic64BtS(b) s, err := garlic64BtS(b)
if err != nil { if err != nil {