diff options
| author | Mia Herkt <mia@0x0.st> | 2022-08-01 18:26:35 +0200 |
|---|---|---|
| committer | Mia Herkt <mia@0x0.st> | 2022-08-01 18:26:35 +0200 |
| commit | 5216e9ebaf7046d06afa6273c33b4fa0b1f53ceb (patch) | |
| tree | db933e10d3585246a97879e9b29c4ecac34ad39e /fhost.py | |
| parent | 0db6e4b89507ad1db502b63044544b864e1038c1 (diff) | |
Open upload blacklist in text mode
This wasn’t working since Flask opens files in bin mode by default.
Diffstat (limited to 'fhost.py')
| -rwxr-xr-x | fhost.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -251,7 +251,7 @@ def shorten(url): def in_upload_bl(addr): if app.config["FHOST_UPLOAD_BLACKLIST"]: - with app.open_instance_resource(app.config["FHOST_UPLOAD_BLACKLIST"]) as bl: + with app.open_instance_resource(app.config["FHOST_UPLOAD_BLACKLIST"], "r") as bl: check = addr.lstrip("::ffff:") for l in bl.readlines(): if not l.startswith("#"): |
