mirror of
https://github.com/fluencelabs/tendermint
synced 2025-07-31 04:01:55 +00:00
validate per_page before page
plus an additional check just in case Closes #1688
This commit is contained in:
@@ -189,8 +189,8 @@ func TxSearch(query string, prove bool, page, perPage int) (*ctypes.ResultTxSear
|
||||
}
|
||||
|
||||
totalCount := len(results)
|
||||
page = validatePage(page, perPage, totalCount)
|
||||
perPage = validatePerPage(perPage)
|
||||
page = validatePage(page, perPage, totalCount)
|
||||
skipCount := (page - 1) * perPage
|
||||
|
||||
apiResults := make([]*ctypes.ResultTx, cmn.MinInt(perPage, totalCount-skipCount))
|
||||
|
Reference in New Issue
Block a user