From 5376948304e80579607c405319bd252eaa1dd64f Mon Sep 17 00:00:00 2001 From: Arceliar Date: Sat, 2 Feb 2019 14:23:45 -0600 Subject: [PATCH] use cgi.escape to sanitize obviously bad characters in node labels (this was crashing pygraphviz) --- web/updateGraph.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/web/updateGraph.py b/web/updateGraph.py index 351a995..6d3cb97 100755 --- a/web/updateGraph.py +++ b/web/updateGraph.py @@ -2,6 +2,7 @@ from flask import Config from database import NodeDB import graphPlotter +import cgi import urllib, json url = "http://y.yakamo.org:3000/current" @@ -36,6 +37,7 @@ def generate_graph(time_limit=60*60*3): for ip in data: info = NodeInfo(ip, data[ip][0]) if len(data[ip]) >= 3: info.label = data[ip][2] + info.label = cgi.escape(info.label) toAdd.append(info) nodes = dict()