BitBotFactory / MikaLendingBot

Automated lending on Cryptocurrency exchanges Poloniex and Bitfinex
http://poloniexlendingbot.readthedocs.io/en/latest/index.html
MIT License
1.11k stars 344 forks source link

using abspath for resolving template path #615

Closed M-Igashi closed 6 years ago

M-Igashi commented 6 years ago

os.path.realpath tries to resolve symlink between template and actual working directory which causes 404 error in multi market config and/or docker images. os.path.abspath is good enough to resolve the path.

Description

TESTING STAGE

Types of changes

Checklist:

rnevet commented 6 years ago

lgtm, was the issue related to using symlinks?

original security issue was related to using /../../ to reach parent directory of webserver and access config file and maybe other location on file system.

@utdrmac does this solve the issue for you as well?

M-Igashi commented 6 years ago

not exactly the matter of symlink, but realpath method strains the path target into single after resolving the absolute path which is the core function of abspath.