luci-proto-openconnect: make PEM values optional
authorJo-Philipp Wich <jo@mein.io>
Wed, 16 Oct 2019 07:30:54 +0000 (09:30 +0200)
committerJo-Philipp Wich <jo@mein.io>
Wed, 16 Oct 2019 07:31:24 +0000 (09:31 +0200)
Fixes: #3191
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
protocols/luci-proto-openconnect/htdocs/luci-static/resources/protocol/openconnect.js

index 14fc8f6d3576be01f62a8a14b93661b9cb26e72e..0490ceb5ea53049b31846ab3845d39d190e193b5 100644 (file)
@@ -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;