re-expand path because user input

This commit is contained in:
meejah 2018-02-22 15:32:00 -07:00
parent f68a0ab74c
commit 22e2d0a417

View File

@ -346,7 +346,12 @@ class _Config(object):
returns an absolute path inside the config directory with any
extra args join()-ed
"""
return os.path.join(self._basedir, *args)
# note: we re-expand here (_basedir already went through this
# expanduser function) in case the path we're being asked for
# has embedded ".."'s in it
return abspath_expanduser_unicode(
os.path.join(self._basedir, *args)
)
@staticmethod
def _contains_unescaped_hash(item):