Description

Internal server error when trying to revert to a page that contains BadContent.

Steps to reproduce

  1. Spam a page heavily.
  2. Add some terms from the spam to BadContent.

  3. Try to revert to a version containing those terms.
  4. Get an error 500 due to uncaught SaveError.

Example

Can someone take a look at this problem?  I went to fix some spamming of the
PythonTraining page:

   http://wiki.python.org/moin/PythonTraining?action=info

(note the three edits after Paul's last change on June 30 - all are spam).
When trying to revert to Paul's version I got an Internal Server Error
message.  Looking at the error log I saw this traceback:

   [Mon Jul 04 13:28:28 2011] [error] Traceback (most recent call last):
   [Mon Jul 04 13:28:28 2011] [error]   File "/usr/lib/pymodules/python2.6/MoinMoin/wsgiapp.py", line 282, in __call__[Mon Jul 04 13:28:28 2011] [error]     response = run(context)
   [Mon Jul 04 13:28:28 2011] [error]   File "/usr/lib/pymodules/python2.6/MoinMoin/wsgiapp.py", line 88, in run
   [Mon Jul 04 13:28:28 2011] [error]     response = dispatch(request, context, action_name)
   [Mon Jul 04 13:28:28 2011] [error]   File "/usr/lib/pymodules/python2.6/MoinMoin/wsgiapp.py", line 136, in dispatch
   [Mon Jul 04 13:28:28 2011] [error]     response = handle_action(context, pagename, action_name)
   [Mon Jul 04 13:28:28 2011] [error]   File "/usr/lib/pymodules/python2.6/MoinMoin/wsgiapp.py", line 195, in handle_action
   [Mon Jul 04 13:28:28 2011] [error]     handler(context.page.page_name, context)
   [Mon Jul 04 13:28:28 2011] [error]   File "/usr/lib/pymodules/python2.6/MoinMoin/action/revert.py", line 107, in execute
   [Mon Jul 04 13:28:28 2011] [error]     revert(pagename, request).render()[Mon Jul 04 13:28:28 2011] [error]   File "/usr/lib/pymodules/python2.6/MoinMoin/action/__init__.py", line 214, in render
   [Mon Jul 04 13:28:28 2011] [error]     success, self.error = self.do_action()[Mon Jul 04 13:28:28 2011] [error]   File "/usr/lib/pymodules/python2.6/MoinMoin/action/revert.py", line 62, in do_action
   [Mon Jul 04 13:28:28 2011] [error]     msg = pg.revertPage(rev, comment)[Mon Jul 04 13:28:28 2011] [error]   File "/usr/lib/pymodules/python2.6/MoinMoin/PageEditor.py", line 683, in revertPage
   [Mon Jul 04 13:28:28 2011] [error]     msg = self.saveText(pg.get_raw_body(), 0, extra=revstr, action="SAVE/REVERT", notify=False, comment=comment)
   [Mon Jul 04 13:28:28 2011] [error]   File "/usr/lib/pymodules/python2.6/MoinMoin/PageEditor.py", line 1066, in saveText
   [Mon Jul 04 13:28:28 2011] [error]     if not request.user.may.save(self, newtext, rev, **kw):[Mon Jul 04 13:28:28 2011] [error]   File "/usr/lib/pymodules/python2.6/MoinMoin/security/antispam.py", line 190, in save
   [Mon Jul 04 13:28:28 2011] [error]     raise editor.SaveError(msg)
   [Mon Jul 04 13:28:28 2011] [error] SaveError: Sorry, can not save page because "pb{{{

ali.com" is not allowed in this wiki.

}}}

Component selection

Details

MoinMoin Version

1.9.3

OS and Version

Python Version

2.6

Server Setup

Server Details

Language you are using the wiki in (set in the browser/UserPreferences)

Workaround

Check the error in logs and revert to a different version.

Discussion

Plan


CategoryMoinMoinBugFixed - after the bug is fixed in current code. CategoryMoinMoinBug

MoinMoin: MoinMoinBugs/SaveError on revert due to BadContent (last edited 2011-07-05 18:19:15 by RadomirDopieralski)