Edgewall Software

Opened 2 years ago

Closed 2 years ago

#13037 closed defect (fixed)

IndexError: list assignment index out of range

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Milestone: 1.0.17
Component: ticket system Version: 1.0-stable
Severity: normal Keywords:
Cc: Branch:
Release Notes:

Fix exception in log due to invalid Query module request.

API Changes:
Internal Changes:


2018-06-01 01:44:42,441 Trac[main] ERROR: [] Internal Server Error: <RequestWithSession "POST '/query'">, referrer 'https://bugs.jquery.com/query'
Traceback (most recent call last):
  File "/var/www/bugs.jquery.com/private/pve/local/lib/python2.7/site-packages/trac/web/main.py", line 623, in _dispatch_request
  File "/var/www/bugs.jquery.com/private/pve/local/lib/python2.7/site-packages/trac/web/main.py", line 239, in dispatch
    resp = chosen_handler.process_request(req)
  File "/var/www/bugs.jquery.com/private/pve/local/lib/python2.7/site-packages/trac/ticket/query.py", line 914, in process_request
    constraints = self._get_constraints(req)
  File "/var/www/bugs.jquery.com/private/pve/local/lib/python2.7/site-packages/trac/ticket/query.py", line 1059, in _get_constraints
    del vals[idx]
IndexError: list assignment index out of range

Attachments (0)

Change History (3)

comment:1 by Ryan J Ollos, 2 years ago

Component: generalticket system
Milestone: 1.0.17

Proposed change:

  • trac/ticket/query.py

    diff --git a/trac/ticket/query.py b/trac/ticket/query.py
    index 275acd4e0..09d5bf7d5 100644
    a b class QueryModule(Component):  
    10581058                                    for (start, end) in zip(vals, ends)]
    10591059                    if k in remove_constraints:
    10601060                        idx = remove_constraints[k]
    1061                         if idx >= 0:
     1061                        if 0 <= idx < len(vals):
    10621062                            del vals[idx]
    10631063                            if not vals:
    10641064                                continue

comment:2 by Ryan J Ollos, 2 years ago

Owner: set to Ryan J Ollos
Status: newassigned
Version: 1.0-stable

comment:3 by Ryan J Ollos, 2 years ago

Release Notes: modified (diff)
Resolution: fixed
Status: assignedclosed

Committed to 1.0-stable in r16619, merged to 1.2-stable in r16620, merged to trunk in r16621.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Ryan J Ollos to the specified user.

Add Comment

E-mail address and name can be saved in the Preferences .
Note: See TracTickets for help on using tickets.