Skip to content

SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.

Fix XSS issue, as identified by Netsparker.

Steve90ca6a2c8615
diff --git a/sfwebui.py b/sfwebui.py
index 920d9f6e..f9c580bc 100644
--- a/sfwebui.py
+++ b/sfwebui.py
@@ -604,6 +604,9 @@ class SpiderFootWebUi:
errState = False
scaninfo = dbh.scanInstanceGet(id)
+ if scaninfo is None:
+ return self.error("Invalid scan ID specified.")
+
if globalScanStatus.getStatus(id) == "FINISHED" or scaninfo[5] == "FINISHED":
error.append("Scan '" + scaninfo[0] + "' is in a finished state. <a href='/scandelete?id=" + \
id + "&confirm=1'>Maybe you want to delete it instead?</a>")
@@ -633,6 +636,11 @@ class SpiderFootWebUi:
def stopscan(self, id):
global globalScanStatus
+ dbh = SpiderFootDb(self.config)
+ scaninfo = dbh.scanInstanceGet(id)
+ if scaninfo is None:
+ return self.error("Inalid scan ID.")
+
if globalScanStatus.getStatus(id) is None:
return self.error("That scan is not actually running. A data consistency " + \
"error for this scan probably exists. <a href='/scandelete?id=" + \