Opened 8 years ago

#6503 new defect

Error in validate_wiki_page (spamfilter)

Reported by: Oliver Metz Owned by: Alec Thomas
Priority: normal Component: AddCommentMacro
Severity: normal Keywords:
Cc: Trac Release: 0.11


Running trac-0.11.7 with latest spamfilter and addcomment plugins gave me the following error:

2010-01-28 14:35:06,983 Trac[formatter] ERROR: Macro AddComment(None) failed:.
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/Trac-0.11.7stable_r0-py2.6.egg/trac/wiki/", line 484, in _macro_formatter
    return macro.process(args, in_paragraph=True)
  File "/usr/local/lib/python2.6/dist-packages/Trac-0.11.7stable_r0-py2.6.egg/trac/wiki/", line 180, in process
    text = self.processor(text)
  File "/usr/local/lib/python2.6/dist-packages/Trac-0.11.7stable_r0-py2.6.egg/trac/wiki/", line 167, in _macro_processor
  File "build/bdist.linux-x86_64/egg/addcomment/", line 125, in expand_macro
    for field, message in manipulator.validate_wiki_page(req, page):
  File "build/bdist.linux-x86_64/egg/tracspamfilter/", line 88, in validate_wiki_page
    text = req.args['text']
KeyError: text

This occured only for non-admin users. Attached patch fixes this. Is this the right way to fix the problem?

Attachments (1)

fix_spamfilter_error.patch (557 bytes) - added by Oliver Metz 8 years ago.

Download all attachments as: .zip

Change History (1)

Changed 8 years ago by Oliver Metz

Attachment: fix_spamfilter_error.patch added

Modify Ticket

Change Properties
Set your email in Preferences
as new The owner will remain Alec Thomas.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.