diff --git a/html/cgi-bin/remote.cgi b/html/cgi-bin/remote.cgi index c76f5129e..576e7628d 100644 --- a/html/cgi-bin/remote.cgi +++ b/html/cgi-bin/remote.cgi @@ -254,7 +254,10 @@ sub viewkey if ( -e $key ) { - my @temp = split(/ /,`/usr/bin/ssh-keygen -l -f $key`); + # Use safe system_output function to call ssh-keygen and get the output from the tool. + my @ssh_keygen = &General::system_output("/usr/bin/ssh-keygen", "-l", -"-f", "$key"); + + my @temp = split(/ /, @ssh_keygen); my $keysize = &Header::cleanhtml($temp[0],"y"); my $fingerprint = &Header::cleanhtml($temp[1],"y"); print "
$key$fingerprint