From 9093926135bd233d89362215c5441a7a91fcca06 Mon Sep 17 00:00:00 2001 From: tidwall Date: Wed, 12 Aug 2020 10:58:49 -0700 Subject: [PATCH] Limit geohash precision to 12 --- internal/server/token.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/server/token.go b/internal/server/token.go index 52f97774..c12865c3 100644 --- a/internal/server/token.go +++ b/internal/server/token.go @@ -662,7 +662,8 @@ func (s *Server) parseSearchScanBaseTokens( } } if sprecision != "" { - if t.precision, err = strconv.ParseUint(sprecision, 10, 64); err != nil || t.precision == 0 || t.precision > 64 { + t.precision, err = strconv.ParseUint(sprecision, 10, 64) + if err != nil || t.precision == 0 || t.precision > 12 { err = errInvalidArgument(sprecision) return }