From: Paul Donald Date: Fri, 22 May 2026 12:30:50 +0000 (+0300) Subject: luci-proto-openconnect: correctness fixes X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=ef94e6827fcad85632f545f85e308b3423008aae;p=openwrt-luci.git luci-proto-openconnect: correctness fixes Signed-off-by: Paul Donald --- 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 01b4498e0e..192eae52fd 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,7 +43,7 @@ function validateCert(priv, section_id, value) { const beg = priv ? /^-----BEGIN (RSA )?PRIVATE KEY-----$/ : /^-----BEGIN CERTIFICATE-----$/; const end = priv ? /^-----END (RSA )?PRIVATE KEY-----$/ : /^-----END CERTIFICATE-----$/; - const lines = value.trim().split(/[\r?\n]/); + const lines = value.trim().split(/[\r\n]/); const base64 = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/; const errmsg = _('This does not look like a valid PEM file');