From c96ea9a4de3442dc7b24f11ae4ba00ee3af26a0d Mon Sep 17 00:00:00 2001 From: Eddie Kohler Date: Thu, 12 Sep 2024 13:41:58 -0400 Subject: [PATCH] More --- etc/apifunctions.json | 3 ++- src/api/api_specvalidator.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/etc/apifunctions.json b/etc/apifunctions.json index dd11308f4b..01db717d8f 100644 --- a/etc/apifunctions.json +++ b/etc/apifunctions.json @@ -238,7 +238,8 @@ }, { "name": "settings", "get": true, "post": true, - "function": "Settings_API::run" + "function": "Settings_API::run", + "parameters": ["?=settings", "?dryrun"] }, { "name": "shepherd", "paper": true, "get": true, diff --git a/src/api/api_specvalidator.php b/src/api/api_specvalidator.php index 85ca84e085..54fcd06b7c 100644 --- a/src/api/api_specvalidator.php +++ b/src/api/api_specvalidator.php @@ -60,7 +60,7 @@ static function run($uf, Qrequest $qreq) { } foreach (array_keys($_FILES) as $n) { if (($t = self::lookup_param_type($n, $known, $has_suffix)) === null - || ($t & self::F_FILE) === 0) { + || ($t & (self::F_FILE | self::F_BODY)) === 0) { if (!isset($known["*"])) { self::error($qreq, "file param `{$n}` unknown"); }