|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56129 patch to verify version numbers on release upload
Submitted: 2004-07-12 11:46 UTC Modified: 2006-12-26 23:23 UTC
From: Assigned: danielc (profile)
Status: Closed Package: PECL website (PECL)
PHP Version: Irrelevant OS: na
Private report: No CVE-ID: None
 [2004-07-12 11:46 UTC]
I'm out of town and can't easily verify this patch.  However, if it works, please commit it.

Index: public_html/release-upload.php
RCS file: /repository/pearweb/public_html/release-upload.php,v
retrieving revision 1.39
diff -u -r1.39 release-upload.php
--- public_html/release-upload.php	22 Jun 2004 04:00:37 -0000	1.39
+++ public_html/release-upload.php	12 Jul 2004 15:44:44 -0000
@@ -216,6 +216,12 @@
                  . 'You may want to correct your package.xml file:');
+    $version = $info['version'];
+    if (!preg_match('/^\d+\.\d+\.\d+(?:[a-z]+\d*)?$/', $version)) {
+        report_error('Version must in format digit.digit.digit[lower-case alpha[digits]]', 'errors','ERRORS:<br />'
+                 . 'You must correct your package.xml file:');
+    }
     $check = array(


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2004-07-12 12:21 UTC] danielc at analysisandsolutions dot com

Is it possible, please, to add this check to the package-validate procedures in the PEAR base classees?  Then, use that validation in release::validateUpload() include/pear-database.php?


 [2004-07-12 15:22 UTC]
Pushing this patch into the installer code base will make it impossible to use the installer in environments where other naming schemes apply.
 [2004-07-12 15:48 UTC] danielc at analysisandsolutions dot com
Martin: good point.  Can you please apply the changes to pearweb?

Greg: guess this could be incorporated into the package-validate stuff via the new channels support.
 [2004-07-13 02:01 UTC] danielc at analysisandsolutions dot com
Fixed in CVS.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Mar 03 10:01:29 2024 UTC