Unverified Commit ac6bfc1d authored by idk's avatar idk

fix broken validation

parent 04300cfb
......@@ -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 {
......
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