From 5b1c1a7b3b3e2104ed75742043ff7b8924e6f083 Mon Sep 17 00:00:00 2001 From: Yash Sancheti <32770175+Onyx2406@users.noreply.github.com> Date: Sat, 1 Jul 2023 16:31:56 +0530 Subject: [PATCH] Update analysis.py --- webinterface/analysis/analysis.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/webinterface/analysis/analysis.py b/webinterface/analysis/analysis.py index 35e1b29ac..9486e76c2 100644 --- a/webinterface/analysis/analysis.py +++ b/webinterface/analysis/analysis.py @@ -1,5 +1,6 @@ from flask import Blueprint from flask import render_template +from flask import escape import json from collections import defaultdict from datetime import datetime @@ -306,7 +307,8 @@ def set_alerts(profile, timewindow): tw_name = tws[timewindow]["name"] data.append( - {"alert": alert_timestamp, "alert_id": alert_ID, "profileid": profile_ip, "timewindow": tw_name, + {"alert": escape(alert_timestamp), "alert_id": escape(alert_ID), + "profileid": escape(profile_ip), "timewindow": escape(tw_name), "evidence_count": evidence_count}) return {"data": data}