Modify

Opened 5 years ago

#6503 new defect

Error in validate_wiki_page (spamfilter)

Reported by: olistudent Owned by: athomas
Priority: normal Component: AddCommentMacro
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

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/formatter.py", 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/formatter.py", 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/formatter.py", line 167, in _macro_processor
    text)
  File "build/bdist.linux-x86_64/egg/addcomment/macro.py", line 125, in expand_macro
    for field, message in manipulator.validate_wiki_page(req, page):
  File "build/bdist.linux-x86_64/egg/tracspamfilter/adapters.py", 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 olistudent 5 years ago.

Download all attachments as: .zip

Change History (1)

Changed 5 years ago by olistudent

Add Comment

Modify Ticket

Action
as new .
Author


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

 
Note: See TracTickets for help on using tickets.