Limit geohash precision to 12

This commit is contained in:
tidwall 2020-08-12 10:58:49 -07:00
parent 019995e5f6
commit 5f5c4d9f03
1 changed files with 2 additions and 1 deletions

View File

@ -662,7 +662,8 @@ func (s *Server) parseSearchScanBaseTokens(
} }
} }
if sprecision != "" { 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) err = errInvalidArgument(sprecision)
return return
} }