Compare commits

..

No commits in common. "1bb3e59a46400d1a06b25a061a4ef50cdf10e22e" and "7e507748c466aeaff13ceb481b57c836bbec15c3" have entirely different histories.

2 changed files with 4 additions and 7 deletions

View File

@ -10,14 +10,11 @@ It's easy peasy my dude
```bash ```bash
apt install pip3 apt install pip3
pip3 install pipenv pip3 install pipenv
apt install npm
npm install bower
``` ```
2. Get dependencies 2. Get dependencies
```bash ```bash
pipenv install pipenv Install
bower install
``` ```
3. Initialize 3. Initialize

View File

@ -33,11 +33,11 @@ def load_user(id):
limiter = Limiter(app, key_func=flask_limiter.util.get_ipaddr, headers_enabled=True) limiter = Limiter(app, key_func=flask_limiter.util.get_ipaddr, headers_enabled=True)
def is_secure_path(path, servepath=None): def is_secure_path(path, servepath=None):
realpath = os.path.abspath(path) + os.path.sep realpath = os.path.realpath(path) + os.path.sep
if servepath is None: if servepath is None:
servepath = os.path.abspath(app.config['SERVE_DIR']) servepath = os.path.realpath(app.config['SERVE_DIR'])
else: else:
servepath = os.path.abspath(servepath) servepath = os.path.realpath(servepath)
return realpath.startswith(servepath) return realpath.startswith(servepath)