Remove cariage returns in the SSH keys.

This commit is contained in:
Loic d'Anterroches 2009-01-17 16:37:14 +01:00
parent 7e7b5a4409
commit 48355417d7

View File

@ -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";
}
}