mediasrv symlink fix

https://forums.ankiweb.net/t/anki-2-1-28-beta/629/39
This commit is contained in:
Damien Elmes 2020-07-11 10:53:41 +10:00
parent c34a99871b
commit bc5b6dfb63

View File

@ -105,7 +105,7 @@ def allroutes(pathin):
directory = os.path.realpath(directory)
path = os.path.normpath(path)
fullpath = os.path.realpath(os.path.join(directory, path))
fullpath = os.path.abspath(os.path.join(directory, path))
# protect against directory transversal: https://security.openstack.org/guidelines/dg_using-file-paths.html
if not fullpath.startswith(directory):