Indefero

Indefero Commit Details


Date:2011-07-05 04:30:23 (13 years 5 months ago)
Author:William MARTIN
Branch:develop, feature.content-md5, feature.diff-whitespace, feature.issue-of-others, feature.search-filter, feature.webrepos, feature.wiki-default-page, release-1.2, release-1.3
Commit:f2b1ce795cff8363e0df3628a9c31bdff72bccbc
Parents: 9bbcd571ecf5896ff0985678a1ab1cc6aac6df83
Message:Fix issue 247 : cron overwrites authorized_keys during cron run

Changes:

File differences

src/IDF/Plugin/SyncGit/Cron.php
5959
6060
6161
62
63
64
65
66
67
68
69
70
71
6272
6373
6474
$out .= sprintf($template, $cmd, $key->login, $content)."\n";
}
}
$out = "# indefero start" . PHP_EOL . $out . "# indefero end" . PHP_EOL;
// 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, $original_keys);
} else {
$out .= $original_keys;
}
file_put_contents($authorized_keys, $out, LOCK_EX);
}

Archive Download the corresponding diff file

Page rendered in 0.07605s using 14 queries.