Remove cariage returns in the SSH keys.
This commit is contained in:
parent
7e7b5a4409
commit
48355417d7
@ -51,7 +51,7 @@ class IDF_Plugin_SyncGit_Cron
|
||||
foreach ($keys as $key) {
|
||||
if (strlen($key->content) > 40 // minimal check
|
||||
and preg_match('/^[a-zA-Z][a-zA-Z0-9_.-]*(@[a-zA-Z][a-zA-Z0-9.-]*)?$/', $key->login)) {
|
||||
$content = str_replace("\n", '', $key->content);
|
||||
$content = trim(str_replace(array("\n", "\r"), '', $key->content));
|
||||
$out .= sprintf($template, $cmd, $key->login, $content)."\n";
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user