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

pull/233/head
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
1 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@
import redis import redis
import json import json
import flask 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 difflib
import ssdeep import ssdeep
@ -170,7 +170,7 @@ def showsavedrawpaste():
requested_path = request.args.get('paste', '') requested_path = request.args.get('paste', '')
paste = Paste.Paste(requested_path) paste = Paste.Paste(requested_path)
content = paste.get_p_content() content = paste.get_p_content()
return content, 200, {'Content-Type': 'text/plain'} return Response(content, mimetype='text/plain')
@showsavedpastes.route("/showpreviewpaste/") @showsavedpastes.route("/showpreviewpaste/")
def showpreviewpaste(): def showpreviewpaste():