Re: [pear-webmaster] release-upload.php patch

From: Date: Mon, 12 Jul 2004 20:44:40 +0000
Subject: Re: [pear-webmaster] release-upload.php patch
References: 1 2  Groups: php.pear.webmaster 
Request: Send a blank email to pear-webmaster+get-2785@lists.php.net to get a copy of this message
> > Please find included a simple patch to release-upload.php that prevents > > people from uploading files that label themselves as > > Foo_Bar-1.2. > > It disqualifies any package.xml witha version that does not contain 2 > > .'s.(ie: 1.2, 1.2.3.4 are wrong, 1.2.0, 2.4.146) are fine. > > It does not overwrite the already in place check from PEAR_Common. It also > > does not odify that check, since that would prevent people from installing > > alreayd released packages with wrong version numbers. > > Your patch got mixed up with some strange encoding. Can you please > resubmit it? Once more, both inline and attached Cipri --- release-upload.php 22 Jun 2004 04:00:37 -0000 1.39 +++ release-upload.php 12 Jul 2004 20:44:41 -0000 @@ -216,6 +216,10 @@ . 'You may want to correct your package.xml file:'); // XXX ADD MASSIVE SANITY CHECKS HERE + if (substr_count($info['version'], '.') != 2){ + // A valid version number has two . seperators. + $errors[] = 'invalid package version'; + } $check = array( 'summary',

Index: release-upload.php =================================================================== RCS file: /repository/pearweb/public_html/release-upload.php,v retrieving revision 1.39 diff -u -r1.39 release-upload.php --- release-upload.php 22 Jun 2004 04:00:37 -0000 1.39 +++ release-upload.php 12 Jul 2004 20:45:06 -0000 @@ -216,6 +216,10 @@ . 'You may want to correct your package.xml file:'); // XXX ADD MASSIVE SANITY CHECKS HERE + if (substr_count($info['version'], '.') != 2){ + // A valid version number has two . seperators. + $errors[] = 'invalid package version'; + } $check = array( 'summary',
« previous php.pear.webmaster (#2785) next »