Bug #1856 [Com]: patch to verify version numbers on release upload

From: Date: Mon, 12 Jul 2004 19:48:30 +0000
Subject: Bug #1856 [Com]: patch to verify version numbers on release upload
References: 1  Groups: php.pear.webmaster 
Request: Send a blank email to pear-webmaster+get-2784@lists.php.net to get a copy of this message
Edit report at http://pear.php.net/bugs/bug.php?id=1856&edit=1 ID: 1856 Comment by: danielc at analysisandsolutions dot com Reported By: cellog at php dot net Status: Open Type: Bug Package: Web Site Operating System: na PHP Version: Irrelevant New Comment: 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. Previous Comments: ------------------------------------------------------------------------ [2004-07-12 15:22:28] mj at php dot net 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 12:21:52] danielc at analysisandsolutions dot com Greg: 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? Thanks, --Dan ------------------------------------------------------------------------ [2004-07-12 11:46:46] cellog at php dot net Description: ------------ 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:'); // XXX ADD MASSIVE SANITY CHECKS HERE + + $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( 'summary', ------------------------------------------------------------------------ -- Edit this bug report at http://pear.php.net/bugs/bug.php?id=1856&edit=1

« previous php.pear.webmaster (#2784) next »