fix: [UI-Showpaste] show raw paste, force text/plain mimetype

This commit is contained in:
Terrtia 2018-08-03 09:15:34 +02:00
parent d7545a46f0
commit 54cc4f3723
No known key found for this signature in database
GPG key ID: 1E1B1F50D84613D0

View file

@ -7,7 +7,7 @@
import redis
import json
import flask
from flask import Flask, render_template, jsonify, request, Blueprint, make_response
from flask import Flask, render_template, jsonify, request, Blueprint, make_response, Response
import difflib
import ssdeep
@ -170,7 +170,7 @@ def showsavedrawpaste():
requested_path = request.args.get('paste', '')
paste = Paste.Paste(requested_path)
content = paste.get_p_content()
return content, 200, {'Content-Type': 'text/plain'}
return Response(content, mimetype='text/plain')
@showsavedpastes.route("/showpreviewpaste/")
def showpreviewpaste():