Closed Bug 567709 Opened 14 years ago Closed 14 years ago

[k] Sanity check range filters on search

Categories

(support.mozilla.org :: Search, defect, P3)

defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: jsocol, Assigned: jgross)

References

()

Details

We quietly assume that max values are >= min values for ranges (like created dates) and pass them directly to the SphinxAPI where an assert can fail (of course). Here's the stack:

  File "/data/virtualenvs/kitsune/src/django/django/core/handlers/base.py", line 101, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

  File "/data/www/support.mozilla.com/kitsune/apps/search/views.py", line 299, in search
    documents += fc.query(cleaned['q'], filters_f)

  File "/data/www/support.mozilla.com/kitsune/apps/search/clients.py", line 90, in query
    f['max'], f.get('exclude', False))

  File "/data/www/support.mozilla.com/kitsune/apps/search/sphinxapi.py", line 389, in SetFilterRange
    assert(min_<=max_)

AssertionError


<WSGIRequest
GET:<QueryDict: {u'status': [u'92'], u'a': [u'1'], u'forum': [u'1'], u'created': [u'2'], u'author': [u'zawlinn'], u'q': [u'www.alphazawgyi.net/myanmarunicode-2008'], u'sortby': [u'2'], u'w': [u'2'], u'created_date': [u'05/22/2010'], u'lastmodif': [u'0']}>,
Priority: P2 → P3
Assignee: nobody → jgross
http://github.com/jsocol/kitsune/commit/bdf8654d95a88931eed490040851baa336a51f85
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
James: is this an internal thing, or is there an easy way for QA to reproduce (and verify) this bug?
Setting a "created after" date in the future should no longer result in a 500 error.
You need to log in before you can comment on or make changes to this bug.