luci-mod-system: sshkeys.js: do not incorrectly filter ecdsa keys on load
authorJo-Philipp Wich <jo@mein.io>
Wed, 13 Nov 2019 15:55:28 +0000 (16:55 +0100)
committerJo-Philipp Wich <jo@mein.io>
Wed, 13 Nov 2019 15:55:28 +0000 (16:55 +0100)
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
modules/luci-mod-system/htdocs/luci-static/resources/view/system/sshkeys.js

index 8b9673ae114878484e6a861ebe05fe46d449ac62..ce3bac9612a957823dacc9c2fec0c9a6f1274662 100644 (file)
@@ -217,7 +217,7 @@ return L.view.extend({
        load: function() {
                return fs.lines('/etc/dropbear/authorized_keys').then(function(lines) {
                        return lines.filter(function(line) {
-                               return line.match(/^ssh-/) != null;
+                               return line.match(/^(ssh-rsa|ssh-dss|ssh-ed25519|ecdsa-sha2)\b/) != null;
                        });
                });
        },