Closed fpChan closed 4 years ago
add x/backend query params verification
the invalid request should return after params verification. the page and per-page params need verification in the following code.
type QueryMatchParams struct { Product string Start int64 End int64 Page int PerPage int } // NewQueryMatchParams creates a new instance of QueryMatchParams func NewQueryMatchParams(product string, start, end int64, page, perPage int) QueryMatchParams { if page == 0 && perPage == 0 { page = DefaultPage perPage = DefaultPerPage } return QueryMatchParams{ Product: product, Start: start, End: end, Page: page, PerPage: perPage, } }
Invalid database request
None
the invalid request should return after params verification.
fixed in opendex pr. commit: https://github.com/okex/okchain/pull/305/files#diff-98356b82e627197cec835b6b36876ae1
Summary of Bug
add x/backend query params verification
1. Describe
the invalid request should return after params verification.
the page and per-page params need verification in the following code.
2. Impact
Invalid database request
3. Recover
None
Expected Result
the invalid request should return after params verification.
Version
Steps to Reproduce
For Admin Use