cvs: pearweb /cron update-website.php
| From: | Greg Beaver | Date: | Wed, 26 Sep 2007 02:31:05 +0000 |
| Subject: | cvs: pearweb /cron update-website.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-cvs+get-48679@lists.php.net to get a copy of this message | ||
cellog Wed Sep 26 02:31:05 2007 UTC
Modified files:
/pearweb/cron update-website.php
Log:
don't allow any pearweb packages to overwrite bin_dir files
by mistake or by compromise of the pearweb release
mechanism
http://cvs.php.net/viewvc.cgi/pearweb/cron/update-website.php?r1=1.5&r2=1.6&diff_format=u
Index: pearweb/cron/update-website.php
diff -u pearweb/cron/update-website.php:1.5 pearweb/cron/update-website.php:1.6
--- pearweb/cron/update-website.php:1.5 Mon Jun 25 20:04:50 2007
+++ pearweb/cron/update-website.php Wed Sep 26 02:31:04 2007
@@ -8,8 +8,13 @@
* @license http://www.php.net/license/3_01.txt
PHP License
* @version $Id: trackback-cleanup.php,v 1.3 2006/02/07 18:14:38 mj Exp $
*/
+require_once 'PEAR/Config.php';
require_once 'PEAR/PackageUpdate.php';
require_once 'PEAR/PackageUpdate/Cli.php';
+$singleton = &PEAR_Config::singleton();
+// even if someone compromises pearweb, there's no way to install anything that would
overwrite
+// a critical file
+$singleton->set('bin_dir', '/dev/null');
$pearweb = &PEAR_PackageUpdate::factory('Cli', 'pearweb',
'pear.php.net');
if ($pearweb) {
$pearweb->setMinimumState(PEAR_PACKAGEUPDATE_STATE_STABLE);