mirror of
https://git.0x0.st/mia/0x0.git
synced 2026-01-10 04:21:46 +03:00
fix text/ MIME charset workaround for real
This commit is contained in:
2
fhost.py
2
fhost.py
@@ -143,7 +143,7 @@ def store_file(f, addr):
|
|||||||
if mime in app.config["FHOST_MIME_BLACKLIST"] or guessmime in app.config["FHOST_MIME_BLACKLIST"]:
|
if mime in app.config["FHOST_MIME_BLACKLIST"] or guessmime in app.config["FHOST_MIME_BLACKLIST"]:
|
||||||
abort(415)
|
abort(415)
|
||||||
|
|
||||||
if mime.startswith("text/") and not "charset" in f.content_type:
|
if mime.startswith("text/") and not "charset" in mime:
|
||||||
mime += "; charset=utf-8"
|
mime += "; charset=utf-8"
|
||||||
|
|
||||||
ext = os.path.splitext(f.filename)[1]
|
ext = os.path.splitext(f.filename)[1]
|
||||||
|
|||||||
Reference in New Issue
Block a user