SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.
Python attacksurfacecticybersecurityfootprintinghackinginformation-gatheringinformation-securityinfosecintelligence-gatheringosintosint-frameworkosint-reconnaissanceosint-toolpentestingpythonreconsecurity-toolsthreat-intelligencethreatintel
sfwebui: Fix 'Save Settings' form submission
Brendan Colesc7aa2358ddf3
diff --git a/dyn/opts.tmpl b/dyn/opts.tmplindex 50275b35..ce86b638 100644--- a/dyn/opts.tmpl+++ b/dyn/opts.tmpl@@ -8,12 +8,12 @@Settings updated. These will take effect the next time you run a scan.</div>% endif-<form class="form" action='${docroot}/savesettings' id=savesettingsform method='POST' enctype="multipart/form-data">+<form class="form" action='${docroot}/savesettings' id="savesettingsform" method='POST' enctype="multipart/form-data"><div class='text-left'><input type=hidden id='allopts' name='allopts' value=''><input type=hidden id='token' name='token' value="${token}"><input type="file" name='configFile' id="configFile" class='hidden' onChange='$("#savesettingsform").submit()' />- <button id="btn-save-changes" class='btn btn-primary'>Save Changes</button>+ <button id="btn-save-changes" class='btn btn-primary' type="submit">Save Changes</button><button id="btn-import-config" class='btn btn-info'>Import API Keys</button><button id="btn-opt-export" class='btn btn-info'>Export API Keys</button><button id="btn-reset-settings" class='btn btn-danger'>Reset to Factory Default</button>diff --git a/static/js/spiderfoot.opts.js b/static/js/spiderfoot.opts.jsindex 59991909..4df762f5 100644--- a/static/js/spiderfoot.opts.js+++ b/static/js/spiderfoot.opts.js@@ -30,7 +30,7 @@ function getFile(elemId) {}$(document).ready(function() {- $("#btn-save-changes").click(function() { saveSettings(); return false; });+ $("#btn-save-changes").click(function() { saveSettings(); });$("#btn-import-config").click(function() { getFile("configFile"); return false; });$("#btn-reset-settings").click(function() { clearSettings(); });$("#btn-opt-export").click(function() { window.location.href=docroot + "/optsexport?pattern=api_key"; return false; });