• 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
..
sqlamodel Loading commit data...
__init__.py Loading commit data...
fileadmin.py Loading commit data...