diff --git a/NEWS.mdtext b/NEWS.mdtext index 4d37b1f..7205df9 100644 --- a/NEWS.mdtext +++ b/NEWS.mdtext @@ -7,6 +7,11 @@ for him (but still no one was actually accessible). This has been fixed. +- Fixed a problem where the SyncGit plugin doesn't properly + updates the authorized_keys file when the public key + data contained slashes (thanks to Simon Gareste for the + fix!) + # InDefero 1.3.2 - Wed May 09 20:05 2012 UTC ## Bugfixes diff --git a/src/IDF/Plugin/SyncGit/Cron.php b/src/IDF/Plugin/SyncGit/Cron.php index ffff9d5..bbbf55e 100644 --- a/src/IDF/Plugin/SyncGit/Cron.php +++ b/src/IDF/Plugin/SyncGit/Cron.php @@ -64,7 +64,7 @@ class IDF_Plugin_SyncGit_Cron // We update only the part of the file between IDF_START / IDF_END comment $original_keys = file_get_contents($authorized_keys); if (strstr($original_keys, "# indefero start") && strstr($original_keys, "# indefero end")) { - $out = preg_replace('/(#\sindefero\sstart).+(#\sindefero\send\s\s?)/isU', + $out = preg_replace('%(#\sindefero\sstart).+(#\sindefero\send\s\s?)%isU', $out, $original_keys); } else { $out .= $original_keys;