You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
w.Write([]byte("You need to provide at least a tag as a key=value pair to search for. Postfix the key with _bech32 to search bech32-encoded addresses or public keys"))
return
}
keyValue:=strings.Split(tag, "=")
key:=keyValue[0]
value, err:=url.QueryUnescape(keyValue[1])
iferr!=nil {
utils.WriteErrorResponse(w, http.StatusBadRequest, sdk.AppendMsgToErr("could not decode address", err.Error()))
This is because it uses r.FormValue, which only returns the first value:
FormValue returns the first value for the named component of the query. POST and PUT body parameters take precedence over URL query string values. FormValue calls ParseMultipartForm and ParseForm if necessary and ignores any errors returned by these functions. If key is not present, FormValue returns the empty string. To access multiple values of the same key, call ParseForm and then inspect Request.Form directly.
Summary of Bug
/txs
only supports a single query using?tag=<key='value'>
, same happens with the CLI cmdSteps to Reproduce
SearchTxRequestHandlerFn
only supports a singletag
to query:cosmos-sdk/client/tx/search.go
Lines 140 to 183 in 555b61e
This is because it uses
r.FormValue
, which only returns the first value:Source: godoc
cc: @jackzampolin @rigelrozanski @cwgoes @alexanderbez @faboweb
For Admin Use
The text was updated successfully, but these errors were encountered: