From 48355417d7135bfc6cdaf4a883c757d79e85174e Mon Sep 17 00:00:00 2001 From: Loic d'Anterroches Date: Sat, 17 Jan 2009 16:37:14 +0100 Subject: [PATCH] Remove cariage returns in the SSH keys. --- src/IDF/Plugin/SyncGit/Cron.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/IDF/Plugin/SyncGit/Cron.php b/src/IDF/Plugin/SyncGit/Cron.php index e11336c..3f83deb 100644 --- a/src/IDF/Plugin/SyncGit/Cron.php +++ b/src/IDF/Plugin/SyncGit/Cron.php @@ -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"; } }