#12503 closed defect (fixed)
IndexError: list index out of range on trac submissing
Reported by: | Owned by: | Ryan J Ollos | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | plugin/spamfilter | Version: | 1.0.9 |
Severity: | normal | Keywords: | sql |
Cc: | Branch: | ||
Release Notes: |
Fixed |
||
API Changes: | |||
Internal Changes: |
Description
I've found and fixed a bug in version 1.0.9dev of the TracSpamFilter plugin (the only one that I was able to install somehow). The bug is only exposed in new installs, while the spam clean procedure did not run yet. I think you can reproduce by deleting from the "system" table the entry with name = 'spamfilter_lastclean'.
Here's the patch:
--- api.py.000 2016-06-03 07:49:53.000000000 -0700 +++ api.py 2016-06-03 07:52:23.000000000 -0700 @@ -241,8 +241,7 @@ row = self.env.db_query("SELECT value FROM system " "WHERE name='spamfilter_lastclean'") + last = int(row[0][0]) except: pass - else: - last = int(row[0][0]) tim = int(time.time()) if last+self.captcha_cleantime < tim:
Please let me know if there's a more recent version of the plugin I should be using instead. This is against Trac 1.0.5. Thanks.
Attachments (0)
Change History (5)
comment:1 by , 9 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:2 by , 9 years ago
comment:3 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Thanks for reporting. In [14825] I committed a fix that fixes the regression and transforms the code into idiomatic Trac code.
comment:4 by , 9 years ago
API Changes: | modified (diff) |
---|
Regression from r14617. What was the reason for this changeset?
It does cosmetics and the introduction of a bug. Actually I consider such cosmetic changes as bad. They don't improve the software at all and like here always have the chance of new bugs.