Ticket #9787 (closed defect: fixed)

Opened 1 year ago

Last modified 8 months ago

Error when navigating to ticket attachment page

Reported by: rjollos Assigned to: rjollos
Priority: high Component: PrivateTicketsPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12

Description (Last modified by rjollos)

2012-02-10 16:25:22,729 Trac[main] ERROR: Internal Server Error:
Traceback (most recent call last):
  File "/usr/local/python26_trac12/lib/python2.6/site-packages/Trac-0.12.3-py2.6.egg/trac/web/main.py", line 522, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/local/python26_trac12/lib/python2.6/site-packages/Trac-0.12.3-py2.6.egg/trac/web/main.py", line 243, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/local/python26_trac12/lib/python2.6/site-packages/Trac-0.12.3-py2.6.egg/trac/attachment.py", line 460, in process_request
    return self._render_list(req, parent)
  File "/usr/local/python26_trac12/lib/python2.6/site-packages/Trac-0.12.3-py2.6.egg/trac/attachment.py", line 735, in _render_list
    parent))
  File "/usr/local/python26_trac12/lib/python2.6/site-packages/Trac-0.12.3-py2.6.egg/trac/attachment.py", line 504, in attachment_data
    'can_create': 'ATTACHMENT_CREATE' in context.perm(new_att),
  File "/usr/local/python26_trac12/lib/python2.6/site-packages/Trac-0.12.3-py2.6.egg/trac/perm.py", line 553, in has_permission
    return self._has_permission(action, resource)
  File "/usr/local/python26_trac12/lib/python2.6/site-packages/Trac-0.12.3-py2.6.egg/trac/perm.py", line 567, in _has_permission
    check_permission(action, perm.username, resource, perm)
  File "/usr/local/python26_trac12/lib/python2.6/site-packages/Trac-0.12.3-py2.6.egg/trac/perm.py", line 454, in check_permission
    perm)
  File "build/bdist.linux-x86_64/egg/privatetickets/policy.py", line 44, in check_permission
    return self.check_ticket_access(perm, resource)
  File "build/bdist.linux-x86_64/egg/privatetickets/policy.py", line 58, in check_ticket_access
    tkt = Ticket(self.env, res.id)
  File "/usr/local/python26_trac12/lib/python2.6/site-packages/Trac-0.12.3-py2.6.egg/trac/ticket/model.py", line 61, in __init__
    tkt_id = int(tkt_id)
ValueError: invalid literal for int() with base 10: ''

Attachments

AttachmentsPage.png (22.4 kB) - added by rjollos on 02/10/12 23:33:38.

Change History

02/10/12 23:33:29 changed by rjollos

  • priority changed from normal to high.
  • status changed from new to assigned.
  • description changed.

02/10/12 23:33:38 changed by rjollos

  • attachment AttachmentsPage.png added.

04/14/12 07:12:36 changed by rjollos

When navigating to a page such as /attachment/ticket/3, resource.id is an empty string. It looks like this issue will be fixed by replacing ... and resource.id is not None with ... and resource.id in the conditional check that occurs before the call to self.check_ticket_access(perm, resource).

04/14/12 07:21:23 changed by rjollos

(In [11486]) Fixes #9787: Fixed conditional check for a valid resource.id to resolve an error when navigating to a attachment/ticket/id page. Previously, the resource.id was only checked to determine if it was None.

04/16/12 07:10:22 changed by rjollos

This ticket will be left open for feedback and resolved with milestone 2.1 (#9964).

07/27/12 11:57:00 changed by rjollos

  • status changed from assigned to closed.
  • resolution set to fixed.

09/20/12 22:02:42 changed by rjollos

Related to t:#10280.


Add/Change #9787 (Error when navigating to ticket attachment page)




Change Properties
Action