Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 3473 by Browsing to /reviews/r/<id>/diff/<rev>/fragment/<random number> causes Internal Server Error

What version are you running?

What's the URL of the page containing the problem?
 /reviews/r/<id>/diff/<rev>/fragment/<random number>

What steps will reproduce the problem?
1. Create a review with attached diff and publish it.
2. Browse to aforementioned address.

What is the expected output? What do you see instead?
I would expected to see the typical 404 page. Instead the server generates an internal error and I see the following in the logs:

Traceback (most recent call last):

File "/usr/local/lib/python2.7/dist-packages/Django-1.6.5-py2.7.egg/django/core/handlers/", line 112, in get_response
   response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/usr/local/lib/python2.7/dist-packages/Django-1.6.5-py2.7.egg/django/views/generic/", line 69, in view
   return self.dispatch(request, *args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/Django-1.6.5-py2.7.egg/django/utils/", line 29, in _wrapper
   return bound_func(*args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.2-py2.7.egg/reviewboard/accounts/", line 21, in _check
   return login_required(view_func)(*args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/Django-1.6.5-py2.7.egg/django/contrib/auth/", line 22, in _wrapped_view
   return view_func(request, *args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/Django-1.6.5-py2.7.egg/django/utils/", line 25, in bound_func
   return func(self, *args2, **kwargs2)

File "/usr/local/lib/python2.7/dist-packages/Django-1.6.5-py2.7.egg/django/utils/", line 29, in _wrapper
   return bound_func(*args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.2-py2.7.egg/reviewboard/site/", line 35, in _check
   return view_func(request, local_site=local_site, *args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/Django-1.6.5-py2.7.egg/django/utils/", line 25, in bound_func
   return func(self, *args2, **kwargs2)

File "/usr/local/lib/python2.7/dist-packages/Djblets-0.8.5-py2.7.egg/djblets/util/", line 78, in _call
   f = augmented_func(*args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/Django-1.6.5-py2.7.egg/django/views/generic/", line 87, in dispatch
   return handler(request, *args, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.2-py2.7.egg/reviewboard/reviews/", line 1102, in get

File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.2-py2.7.egg/reviewboard/diffviewer/", line 243, in get
   'file': self._get_requested_diff_file(False),

File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-2.0.2-py2.7.egg/reviewboard/diffviewer/", line 362, in _get_requested_diff_file
   files = get_diff_files(self.diffset, self.filediff, self.interdiffset,

AttributeError: 'ReviewsDiffFragmentView' object has no attribute 'filediff'

What operating system are you using? What browser?
The server is running on Ubuntu 12.04. Browser is Safari OS X 10.9

Please provide any additional information below.
It appears that the exception handler in DiffFragmentView.get() doesn't deal with the case where self.create_renderer() throws before it has a chance to set self.filediff. In fact there are two places where a Http404 error can be raised before the setting of self.filediff in create_renderer(). I believe the exception handler is just too broad and an explicit catch of Http404 errors should be added which just re-raises the error so it can be handled by the default view.

(Now the next question is why are users trying to hit this URL. After initial discussions it appears they are just performing 'rbt post' using Perforce change lists with RBTools 0.6 but I've yet to be able to reproduce the problem so I will leave that to another bug report when I have more information).

You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:

You received this message because you are subscribed to the Google Groups 
"reviewboard-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
To post to this group, send email to
Visit this group at
For more options, visit

Reply via email to