• Salem Harrache's avatar
    Use normalpath() with base_path to avoid abort(404). · 8b6b380b
    Salem Harrache authored
    e.g:
    >>> op.normpath(directory).startswith(base_path)
    False
    >>> op.normpath(directory)
    u'/home/projects/mywebsite/static/utils'
    >>> base_path
    u'/home/projects/mywebsite/admin/../static'
    >>> base_path = op.normpath(base_path)
    >>> op.normpath(directory).startswith(base_path)
    True
    8b6b380b
Name
Last commit
Last update
..
contrib Loading commit data...
model Loading commit data...
static Loading commit data...
templates/admin Loading commit data...
tests Loading commit data...
translations Loading commit data...
__init__.py Loading commit data...
babel.py Loading commit data...
base.py Loading commit data...
form.py Loading commit data...
tools.py Loading commit data...