From: <wrt...@us...> - 2009-01-17 20:02:44
|
Revision: 8842 http://armagetronad.svn.sourceforge.net/armagetronad/?rev=8842&view=rev Author: wrtlprnft Date: 2009-01-17 20:02:39 +0000 (Sat, 17 Jan 2009) Log Message: ----------- Disallowed minuses in resource name attributes. Modified Paths: -------------- www/beta/trunk/www-aabeta/add-resource/upload.suid-php Modified: www/beta/trunk/www-aabeta/add-resource/upload.suid-php =================================================================== --- www/beta/trunk/www-aabeta/add-resource/upload.suid-php 2009-01-17 19:13:41 UTC (rev 8841) +++ www/beta/trunk/www-aabeta/add-resource/upload.suid-php 2009-01-17 20:02:39 UTC (rev 8842) @@ -152,9 +152,9 @@ $errs .= 'ERROR: Invalid filepath generated. Path segments cannot begin with a period, nor are backslashes allowed. "category" may not begin with, end with, nor contain two consecutive slashes. Oh, and author/name/version aren\'t allowed to be null!<br /><br />'; if (!preg_match(",^[a-zA-Z0-9/._-]*$,", $filepath) || false !== strpos($attr['author'].$attr['name'].$attr['version'], '/') - || false !== strpos($attr['author'].$attr['name'].$attr['category'], '.') + || false !== strpos($attr['author'].$attr['name'].$attr['category'], '.' || false !== strpos($attr['name'], '-')) ) - $errs .= 'ERROR: Automatic resource uploading is only permitted for resource filepaths containing alphanumerics and the following characters: slash (category only), period (version only), underscore, and dash/hyphen.<br /><br />To submit this resource anyway, email <a href="mailto:luk...@da...">Luke-Jr</a><br /><br />'; + $errs .= 'ERROR: Automatic resource uploading is only permitted for resource filepaths containing alphanumerics and the following characters: slash (category only), period (version only), underscore, and dash/hyphen (the latter is not allowed in the resource\'s name).<br /><br />To submit this resource anyway, email <a href="mailto:luk...@da...">Luke-Jr</a><br /><br />'; if ($attr['type'] != 'aamap' && $attr['type'] != 'aacockpit') $errs .= 'ERROR: Only resources of type "aamap" and "aacockpit" are currently accepted via the automatic upload.<br /><br />To submit this resource anyway, email <a href="mailto:luk...@da...">Luke-Jr</a><br /><br />'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |