From 9c5e526383d114f099a3840696c92d11f3b9de44 Mon Sep 17 00:00:00 2001 From: Janos Guljas Date: Fri, 27 Apr 2018 14:07:16 +0200 Subject: [PATCH] swarm/api: match URI address with the exact length --- swarm/api/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swarm/api/api.go b/swarm/api/api.go index 479446279c..59d5414483 100644 --- a/swarm/api/api.go +++ b/swarm/api/api.go @@ -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