All pastes #495172 Raw Edit

Something

public text v1 · immutable
·published 2007-05-18 16:38 UTC
rendered paste body
124 if (strpos($filepath, '/.') !== false || $filepath[0] == '.' || strpos($filepath, '\\') !== false ||
    --->strpos($filepath, '//') !== false || !$attr['author'] || !$attr['name'] || !$attr['version'])
125     $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 />';
126 if (!preg_match(",^[a-zA-Z0-9/._-]*$,", $filepath)
127  || false !== strpos($attr['author'].$attr['name'].$attr['version'], '/')
128  || false !== strpos($attr['author'].$attr['name'].$attr['category'], '.')
129 )
130     $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:luke+aaresource@dashjr.
    --->org">Luke-Jr</a><br /><br />';