Fix error reporting of get.php, update packs metadata

This commit is contained in:
mkuba50 2019-01-25 20:29:53 +01:00
parent 71ee367367
commit c4fb38e6f5
4 changed files with 8 additions and 4 deletions

View File

@ -76,11 +76,11 @@ function uupFetchUpd(
return array('error' => 'UNKNOWN_COMBINATION'); return array('error' => 'UNKNOWN_COMBINATION');
} }
if($build < 15063 || $build > 65536) { if($build < 9841 || $build > PHP_INT_MAX-1) {
return array('error' => 'ILLEGAL_BUILD'); return array('error' => 'ILLEGAL_BUILD');
} }
if($minor < 0 || $minor > 65536) { if($minor < 0 || $minor > PHP_INT_MAX-1) {
return array('error' => 'ILLEGAL_MINOR'); return array('error' => 'ILLEGAL_MINOR');
} }

View File

@ -121,6 +121,10 @@ function uupGetFiles(
$files = uupGetOfflineFiles($info); $files = uupGetOfflineFiles($info);
} }
if(isset($files['error'])) {
return $files;
}
$baseless = preg_grep('/^baseless_|-baseless\....$/i', array_keys($files)); $baseless = preg_grep('/^baseless_|-baseless\....$/i', array_keys($files));
foreach($baseless as $val) { foreach($baseless as $val) {
if(isset($files[$val])) unset($files[$val]); if(isset($files[$val])) unset($files[$val]);

View File

@ -16,7 +16,7 @@ limitations under the License.
*/ */
function uupApiVersion() { function uupApiVersion() {
return '1.19.0'; return '1.19.1';
} }
require_once dirname(__FILE__).'/auths.php'; require_once dirname(__FILE__).'/auths.php';

File diff suppressed because one or more lines are too long