[aur-dev] [PATCH] Accept SSH keys with whitespace in comments

Lukas Fleischer lfleischer at archlinux.org
Mon Jun 29 06:59:47 UTC 2015


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

Fixes FS#45488.

Signed-off-by: Lukas Fleischer <lfleischer at archlinux.org>
---
 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


More information about the aur-dev mailing list