If ssh public key data contain forward slashes, the SyncGit cron job

did not properly find and update the region which it should have
under its control (thanks to Simon Gareste for the fix!)
This commit is contained in:
Thomas Keller
2012-05-14 19:38:07 +02:00
parent dd3474c06c
commit 6bb886b92a
2 changed files with 6 additions and 1 deletions

View File

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