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

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

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;