Description

Links with ?action=diff to inexistent or deleted pages throw an exception and show a traceback or an "Internal Server Error" page (depending on debug mode).

Steps to reproduce

  1. Have a wiki http://wiki

  2. Construct a link to an inexistent or a deleted page, like

The same can be tried on this wiki: http://moinmo.in/4ct10n/diff/MoinWiki?action=diff

It might never be possible to catch all silly url constructions users might make (except that security rules should always be met). But users might send links to diffs that they copy from the address bar. For any receiving user it would be a much better usability feeling if they get shown a meaningful wiki message and not just a "Internal Server Error" or a traceback.

There is another source for these links: In the RSS, links with only ?action=diff are added for changed pages (even deleted pages).

  1. Have a wiki http://wiki

  2. Create a page http://wiki/page

  3. Visit http://wiki/action/rss_rc/RecentChanges?action=rss_rc&unique=1&ddiffs=1

  4. Visit the link for the deleted page: http://wiki/action/diff/page?action=diff

Example

traceback

ERROR 2010-01-25 22:40:51,710 MoinMoin.wsgiapp:292 An exception has occurred [http://wiki/action/diff/deleted?action=diff].
Traceback (most recent call last):
  File "/opt/moin/lib/python2.6/site-packages/MoinMoin/wsgiapp.py", line 281, in __call__
    response = run(context)
  File "/opt/moin/lib/python2.6/site-packages/MoinMoin/wsgiapp.py", line 88, in run
    response = dispatch(request, context, action_name)
  File "/opt/moin/lib/python2.6/site-packages/MoinMoin/wsgiapp.py", line 136, in dispatch
    response = handle_action(context, pagename, action_name)
  File "/opt/moin/lib/python2.6/site-packages/MoinMoin/wsgiapp.py", line 195, in handle_action
    handler(context.page.page_name, context)
  File "/opt/moin/lib/python2.6/site-packages/MoinMoin/action/diff.py", line 201, in execute
    'rev_author': oldlog.getEditor(request) or _('N/A'),
AttributeError: 'tuple' object has no attribute 'getEditor'

Component selection

Details

MoinMoin Version

1.9.1

OS and Version

SunOS sun 5.10 Generic_142901-03 i86pc i386 i86pc

Python Version

2.6.1

Server Setup

2.2.11

Server Details

mpm_prefork

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

de

Workaround

Discussion

Plan


CategoryMoinMoinBugFixed

MoinMoin: MoinMoinBugs/1.9DiffActionThrowsException (last edited 2010-01-26 10:34:03 by p5B174E54)