Opened 12 years ago

Closed 12 years ago

#17996 closed Bug (invalid)

Multi-table inheritance can lead to exceptions in the admin

Reported by: anonymous Owned by: nobody
Component: contrib.admin Version: 1.4
Severity: Normal Keywords:
Cc: Melvyn Sopacua Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

using the admin and models using multi-table inheritance, it is possible to construct urls that raise 500 errors (rather than 404's)

(tried with sqlite, postgres)

models:

class MyParent(models.Model):
    pass

class MyChild(MyParent):
    pass

browsing to

/admin/myapp/mychild/foo/

throws a 500 error

looks like it's trying to convert 'foo' to an integer to find entry with that id

Change History (1)

comment:1 by Melvyn Sopacua, 12 years ago

Cc: Melvyn Sopacua added
Resolution: invalid
Status: newclosed

Errors resulting from submitting invalid urls are normally delegated to the site owner (improve your urls.py). The admin is not part of the public site and it's users are not expected to be malicious and see if they can break the application.
Please reopen the bug, if the admin constructs links that are invalid and throw 500 errors.

Note: See TracTickets for help on using tickets.
Back to Top