#4216: FileField validator bug in django0.95
-------------------------------------------+--------------------------------
Reporter: yi.codeplayer at gmail dot com | Owner: adrian
Status: new | Component: Validators
Version: 0.95 | Keywords: FileField validator
Stage: Unreviewed | Has_patch: 0
-------------------------------------------+--------------------------------
in file `django/db/models/fields/__init__.py` line 567 (i.e. the second
line in function `isWithinMediaRoot`),
change it from
{{{
if not f.startswith(os.path.normpath(settings.MEDIA_ROOT)):
}}}
to
{{{
if not f.startswith(os.path.abspath(settings.MEDIA_ROOT)):
}}}
i.e. change `normpath` to `abspath`.
It's fixed in later django version, but still in django 0.95 .
--
Ticket URL: <http://code.djangoproject.com/ticket/4216>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---