mirror of https://github.com/CIRCL/AIL-framework
fix: [UI-Showpaste] show raw paste, force text/plain mimetype
parent
d7545a46f0
commit
54cc4f3723
|
@ -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():
|
||||||
|
|
Loading…
Reference in New Issue