`ssh-keygen -l` returns more than four tokens when there is whitespace
in the key comment.

Fixes FS#45488.

Signed-off-by: Lukas Fleischer <[email protected]>
---
 web/lib/acctfuncs.inc.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/web/lib/acctfuncs.inc.php b/web/lib/acctfuncs.inc.php
index 861de0a..edd38ee 100644
--- a/web/lib/acctfuncs.inc.php
+++ b/web/lib/acctfuncs.inc.php
@@ -1250,7 +1250,7 @@ function ssh_key_fingerprint($ssh_key) {
        unlink($tmpfile);
 
        $tokens = explode(' ', $out[0]);
-       if (count($tokens) != 4) {
+       if (count($tokens) < 4) {
                return false;
        }
 
-- 
2.4.4

Reply via email to