mirror of https://github.com/apache/lucene.git
SOLR-450 -- Validate start param to be non-negative and show friendly error message
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@733458 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5be6d5bdd1
commit
ea3fc08edb
|
@ -120,6 +120,10 @@ public class QueryComponent extends SearchComponent
|
|||
SolrIndexSearcher searcher = req.getSearcher();
|
||||
SolrParams params = req.getParams();
|
||||
|
||||
if (rb.getQueryCommand().getOffset() < 0) {
|
||||
throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, "'start' parameter cannot be negative");
|
||||
}
|
||||
|
||||
// -1 as flag if not set.
|
||||
long timeAllowed = (long)params.getInt( CommonParams.TIME_ALLOWED, -1 );
|
||||
|
||||
|
|
Loading…
Reference in New Issue