summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2011-01-03 14:01:44 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2011-01-03 14:01:44 +0000
commitc76ab45fc650ac4fbcf2dba02231776d7b23f1e2 (patch)
tree1867b430d7cbbe176fa950b2c9991694cf826c8c /django
parent9f49666114fdee60abb68d19b2746db126d2c75c (diff)
[1.2.X] Fixed #14999 -- Ensure that filters on local fields are allowed, and aren't caught as a security problem. Thanks to medhat for the report.
Backport of r15139 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@15140 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
-rw-r--r--django/contrib/admin/options.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/django/contrib/admin/options.py b/django/contrib/admin/options.py
index f85efe4b98..41b50b426e 100644
--- a/django/contrib/admin/options.py
+++ b/django/contrib/admin/options.py
@@ -206,6 +206,8 @@ class BaseModelAdmin(object):
# later.
return True
else:
+ if len(parts) == 1:
+ return True
clean_lookup = LOOKUP_SEP.join(parts)
return clean_lookup in self.list_filter or clean_lookup == self.date_hierarchy