From: Jo-Philipp Wich Date: Wed, 16 Oct 2019 07:30:54 +0000 (+0200) Subject: luci-proto-openconnect: make PEM values optional X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=7a010b11781222622673c948a06acf0929b98d0a;p=oweals%2Fluci.git luci-proto-openconnect: make PEM values optional Fixes: #3191 Signed-off-by: Jo-Philipp Wich --- diff --git a/protocols/luci-proto-openconnect/htdocs/luci-static/resources/protocol/openconnect.js b/protocols/luci-proto-openconnect/htdocs/luci-static/resources/protocol/openconnect.js index 14fc8f6d3..0490ceb5e 100644 --- a/protocols/luci-proto-openconnect/htdocs/luci-static/resources/protocol/openconnect.js +++ b/protocols/luci-proto-openconnect/htdocs/luci-static/resources/protocol/openconnect.js @@ -43,6 +43,9 @@ function validateCert(priv, section_id, value) { start = false, i; + if (value === null || value === '') + return true; + for (i = 0; i < lines.length; i++) { if (lines[i].match(beg)) start = true;