Edgewall Software

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#12682 closed defect (fixed)

TypeError: expected string or buffer — at Version 1

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Milestone: 1.0.14
Component: search system Version:
Severity: normal Keywords:
Cc: Branch:
Release Notes:

Fixed TypeError when repeated q argument to SearchModule.

API Changes:
Internal Changes:

Description

2017-02-07 16:14:11,290 Trac[main] ERROR: Internal Server Error: <RequestWithSession "GET '/search?q=aHR0cHM6Ly90cmFjLWhhY2tzLm9yZy9uZXd0aWNrZXQ%3D&____pgfa=aHR0cHM6Ly90cmFjLWhhY2tzLm9yZy9zZWFyY2g%253D&q='">, referrer 'https://trac-hacks.org/newticket'
Traceback (most recent call last):
  File "/srv/trac-hacks.org/pve/local/lib/python2.7/site-packages/trac/web/main.py", line 562, in _dispatch_request
    dispatcher.dispatch(req)
  File "/srv/trac-hacks.org/pve/local/lib/python2.7/site-packages/trac/web/main.py", line 249, in dispatch
    resp = chosen_handler.process_request(req)
  File "/srv/trac-hacks.org/pve/local/lib/python2.7/site-packages/trac/search/web_ui.py", line 100, in process_request
    data['quickjump'] = self._check_quickjump(req, query)
  File "/srv/trac-hacks.org/pve/local/lib/python2.7/site-packages/trac/search/web_ui.py", line 169, in _check_quickjump
    link = find_element(extract_link(self.env, context, kwd), 'href')
  File "/srv/trac-hacks.org/pve/local/lib/python2.7/site-packages/trac/wiki/formatter.py", line 1598, in extract_link
    return LinkFormatter(env, context).match(wikidom)
  File "/srv/trac-hacks.org/pve/local/lib/python2.7/site-packages/trac/wiki/formatter.py", line 1514, in match
    match = re.match(self.wikiparser.rules, wikitext)
  File "/srv/trac-hacks.org/pve/lib/python2.7/re.py", line 141, in match
    return _compile(pattern, flags).match(string)
TypeError: expected string or buffer

This can be reproduced with /search?q=a&q=.

Change History (1)

comment:1 by Ryan J Ollos, 7 years ago

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

Committed to 1.0-stable in r15512, merged to 1.2-stable in r15513, merged to trunk in r15514.

Note: See TracTickets for help on using tickets.