public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager] fix #3426: ui: parser: adapt parseSSHKey to accept "@..." suffix
@ 2021-06-07 10:44 Lorenz Stechauner
  2021-07-22  7:06 ` Lorenz Stechauner
  2021-07-23  7:09 ` [pve-devel] applied: " Dominik Csapak
  0 siblings, 2 replies; 3+ messages in thread
From: Lorenz Stechauner @ 2021-06-07 10:44 UTC (permalink / raw)
  To: pve-devel

also rearranged the regex groups to allow sk-ecdsa-sha2-...

note: FIDO keys are now parsable, the backend only supports it with
OpenSSH >= 8.2. This may be achieved with upgrading to PVE 7 or
using a back port.
---
 www/manager6/Parser.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/manager6/Parser.js b/www/manager6/Parser.js
index bb6a9a33..23236dac 100644
--- a/www/manager6/Parser.js
+++ b/www/manager6/Parser.js
@@ -565,7 +565,7 @@ Ext.define('PVE.Parser', {
     parseSSHKey: function(key) {
 	//                |--- options can have quotes--|     type    key        comment
 	let keyre = /^(?:((?:[^\s"]|"(?:\\.|[^"\\])*")+)\s+)?(\S+)\s+(\S+)(?:\s+(.*))?$/;
-	let typere = /^(?:(?:sk-)?ssh-(?:dss|rsa|ed25519)|ecdsa-sha2-nistp\d+)$/;
+	let typere = /^(?:(?:sk-)?(?:ssh-(?:dss|rsa|ed25519)|ecdsa-sha2-nistp\d+)(?:@(?:[a-z0-9_-]+\.)+[a-z]{2,})?)$/;
 
 	let m = key.match(keyre);
 	if (!m || m.length < 3 || !m[2]) { // [2] is always either type or key
-- 
2.20.1





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-07-23  7:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-07 10:44 [pve-devel] [PATCH manager] fix #3426: ui: parser: adapt parseSSHKey to accept "@..." suffix Lorenz Stechauner
2021-07-22  7:06 ` Lorenz Stechauner
2021-07-23  7:09 ` [pve-devel] applied: " Dominik Csapak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal