Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.10.15

Bug #6960 channels are not allowed to have "-" in their name
Submitted: 2006-02-28 14:51 UTC
From: cellog Assigned: cellog
Status: Closed Package: PEAR (version 1.4.7)
PHP Version: Irrelevant OS: n/a
Roadmaps: (Not assigned)    
Subscription  


 [2006-02-28 14:51 UTC] cellog (Greg Beaver)
Description: ------------ the channel preg does not allow - in the name. This was discovered because "pear channel-discover pear.midcom-project.org" fails. This patch fixes the problem Index: PEAR/Common.php =================================================================== RCS file: /repository/pear-core/PEAR/Common.php,v retrieving revision 1.154 diff -u -r1.154 Common.php --- PEAR/Common.php 4 Feb 2006 05:01:55 -0000 1.154 +++ PEAR/Common.php 28 Feb 2006 14:47:03 -0000 @@ -51,7 +51,7 @@ define('PEAR_CHANNELS_NAME_PREG', '/^' . _PEAR_CHANNELS_NAME_PREG . '$/'); // this should allow any dns or IP address, plus a path - NO UNDERSCORES ALLOWED -define('_PEAR_CHANNELS_SERVER_PREG', '[a-zA-Z0-9]+(?:\.[a-zA-Z0-9]+)*(\/[a-zA-Z0-9]+)*'); +define('_PEAR_CHANNELS_SERVER_PREG', '[a-zA-Z0-9\-]+(?:\.[a-zA-Z0-9\-]+)*(\/[a-zA-Z0-9\-]+)*'); define('PEAR_CHANNELS_SERVER_PREG', '/^' . _PEAR_CHANNELS_SERVER_PREG . '$/i'); define('_PEAR_CHANNELS_PACKAGE_PREG', '(' ._PEAR_CHANNELS_SERVER_PREG . ')\/('

Comments

 [2006-03-02 18:14 UTC] cellog
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.