Compare commits

...
1 Commits
Author SHA1 Message Date
orin 4694c8dc00 Add flags verification 2023-11-09 20:29:25 +01:00
3 changed files with 15 additions and 4 deletions
+5 -3
View File
@@ -25,10 +25,12 @@ function uupApiPrivateParseFlags($str) {
$split = explode('+', $str); $split = explode('+', $str);
$flags = []; $flags = [];
if(isset($split[1])) if(isset($split[1])) {
$flags = explode(',', strtolower($split[1])); $flags = array_unique(explode(',', strtolower($split[1])));
$flagsSafe = array_intersect(getAllowedFlags(), $flags);
}
return [$split[0], $flags]; return [$split[0], $flagsSafe];
} }
function uupApiPrivateGetLatestBuild() { function uupApiPrivateGetLatestBuild() {
+1 -1
View File
@@ -16,7 +16,7 @@ limitations under the License.
*/ */
function uupApiVersion() { function uupApiVersion() {
return '1.43.2'; return '1.43.3';
} }
require_once dirname(__FILE__).'/auths.php'; require_once dirname(__FILE__).'/auths.php';
+9
View File
@@ -190,3 +190,12 @@ function uupApiConfigIsTrue($config) {
return $data[$config] == true; return $data[$config] == true;
} }
function getAllowedFlags() {
$flags = ['thisonly'];
if(uupApiConfigIsTrue('allow_corpnet'))
$flags[] = 'corpnet';
return $flags;
}