From 54cc4f3723a197f61c3db15dbbb15f06de5e6cc2 Mon Sep 17 00:00:00 2001 From: Terrtia Date: Fri, 3 Aug 2018 09:15:34 +0200 Subject: [PATCH] fix: [UI-Showpaste] show raw paste, force text/plain mimetype --- var/www/modules/showpaste/Flask_showpaste.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/var/www/modules/showpaste/Flask_showpaste.py b/var/www/modules/showpaste/Flask_showpaste.py index 13c2cc45..cc70527c 100644 --- a/var/www/modules/showpaste/Flask_showpaste.py +++ b/var/www/modules/showpaste/Flask_showpaste.py @@ -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():