swarm/api: match URI address with the exact length

This commit is contained in:
Janos Guljas 2018-04-27 14:07:16 +02:00
parent fc5deff624
commit 9c5e526383

View file

@ -40,7 +40,7 @@ import (
)
// TODO: this is bad, it should not be hardcoded how long is a hash
var hashMatcher = regexp.MustCompile("^([0-9A-Fa-f]{64})([0-9A-Fa-f]{64})?")
var hashMatcher = regexp.MustCompile("^([0-9A-Fa-f]{64})([0-9A-Fa-f]{64})?$")
type ErrResourceReturn struct {
key string