1
0
Fork 0
forked from mia/0x0

fix text/ MIME charset workaround for real

This commit is contained in:
Martin Herkt 2016-11-23 01:03:49 +01:00
parent 200d0a369f
commit 6de22ca8fa
No known key found for this signature in database
GPG key ID: C24B9CD04DC6AE7F

View file

@ -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"]:
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"
ext = os.path.splitext(f.filename)[1]