Fix issue 671 : Update the SSH Key preg pattern
This commit is contained in:
parent
3e2f95a152
commit
1940d5c0b5
@ -80,7 +80,10 @@ class IDF_Key extends Pluf_Model
|
||||
if (preg_match('#^\[pubkey ([^\]]+)\]\s*(\S+)\s*\[end\]$#', $this->content, $m)) {
|
||||
return array('mtn', $m[1], $m[2]);
|
||||
}
|
||||
else if (preg_match('#^ssh\-[a-z]{3}\s(\S+)(?:\s(\S+))?$#', $this->content, $m)) {
|
||||
else if (preg_match('#^ssh\-[a-z]{3}\s(\S+)(?:\s(\S*))?$#', $this->content, $m)) {
|
||||
if (!isset($m[2])) {
|
||||
$m[2] = "";
|
||||
}
|
||||
return array('ssh', $m[2], $m[1]);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user