[pve-devel] applied: [PATCH common v2] fix #4778: fix boolean type check for json parameters over the api

Wolfgang Bumiller w.bumiller at proxmox.com
Thu Jun 15 15:00:32 CEST 2023

applied, thanks

On Thu, Jun 15, 2023 at 02:36:43PM +0200, Dominik Csapak wrote:
> if a real json boolean is sent via the api, $value is a
> JSON::PP::Boolean here instead of a string/scalar
> so we should validate that too
> the $value itself can be used normally in conditions like
> ----
> if ($value) {
> ----
> if the value is stringified, the result is either '1' or '0' so even if
> we have some explicit checks like that it should not make a problem

I guess that shouldn't be surprising...

More information about the pve-devel mailing list