#2707: [mod_python] String index out of range
---------------------------+------------------------------------------------
Reporter: littleb | Owner: jonas
Type: defect | Status: reopened
Priority: high | Milestone:
Component: search system | Version: 0.9.3
Severity: major | Resolution:
Keywords: |
---------------------------+------------------------------------------------
Changes (by anonymous):
* status: closed => reopened
* resolution: worksforme =>
Comment:
Try instead
[http://projects.edgewall.com/trac/search?q=F&wiki=on&changeset=on&ticket=on
searching for the letter F].
It looks like the quickjump code is run before the length check. This is
probably so that #1 takes you to ticket:1 instead of telling you your
query is too short. If you enter just one letter and it is upper case the
bug is triggered. That is, `kwd[0].isupper()` passes and
`kwd[1].islower()` raises the IndexError. Adding a `len(kwd) > 1` at the
front of the elif test or as guard to the whole function (as none of the
clauses can pass with len <= 1) should fix it.
--
Ticket URL: <http://projects.edgewall.com/trac/ticket/2707>
The Trac Project <http://trac.edgewall.com/>
_______________________________________________
Trac-Tickets mailing list
[email protected]
http://lists.edgewall.com/mailman/listinfo/trac-tickets