From b587547425eb5ccacf6e21f2b7b9ad2e792d65bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C5=A0pa=C4=8Dek?= Date: Mon, 19 Dec 2022 22:40:46 +0100 Subject: [PATCH 1/2] Params can be specified as an array Starting with 2.11.0 when the named params support was introduced in #141. Close #153 --- extension.neon | 3 +++ 1 file changed, 3 insertions(+) diff --git a/extension.neon b/extension.neon index c508fb2..c01125f 100644 --- a/extension.neon +++ b/extension.neon @@ -36,6 +36,7 @@ parametersSchema: string(), listOf(string()), arrayOf(anyOf(int(), string(), bool())) + listOf(arrayOf(anyOf(int(), string(), bool()))) ) ) ) @@ -45,6 +46,7 @@ parametersSchema: string(), listOf(string()), arrayOf(anyOf(int(), string(), bool())) + listOf(arrayOf(anyOf(int(), string(), bool()))) ) ) ) @@ -54,6 +56,7 @@ parametersSchema: string(), listOf(string()), arrayOf(anyOf(int(), string(), bool())) + listOf(arrayOf(anyOf(int(), string(), bool()))) ) ) ) From 9b53e1faa77811cd296eab8e0d408a2f525f890a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C5=A0pa=C4=8Dek?= Date: Mon, 19 Dec 2022 22:44:24 +0100 Subject: [PATCH 2/2] There are now multiple things where disallowing params makes no sense --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 45e00d7..6236dfd 100644 --- a/README.md +++ b/README.md @@ -306,7 +306,7 @@ The function or method names support [fnmatch()](https://www.php.net/function.fn ### Allow with specified parameters only -You can also narrow down the allowed items when called with some parameters (doesn't apply to constants for obvious reasons). For example, you want to disallow calling `print_r()` but want to allow `print_r(..., true)`. +You can also narrow down the allowed items when called with some parameters (applies only to disallowed method, static & function calls, for obvious reasons). For example, you want to disallow calling `print_r()` but want to allow `print_r(..., true)`. This can be done with optional `allowParamsInAllowed` or `allowParamsAnywhere` configuration keys: ```neon