From: Wolfgang Bumiller <w.bumiller@proxmox.com>
To: Dominik Csapak <d.csapak@proxmox.com>
Cc: pve-devel@lists.proxmox.com
Subject: [pve-devel] applied: [PATCH common v2] fix #4778: fix boolean type check for json parameters over the api
Date: Thu, 15 Jun 2023 15:00:32 +0200 [thread overview]
Message-ID: <mqk33cqb3ksli6t6kw7gxeigrzsvetatjerdq5szmuygurwjqv@urnarutthtqz> (raw)
In-Reply-To: <20230615123643.3570737-1-d.csapak@proxmox.com>
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...
prev parent reply other threads:[~2023-06-15 13:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-15 12:36 [pve-devel] " Dominik Csapak
2023-06-15 13:00 ` Wolfgang Bumiller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=mqk33cqb3ksli6t6kw7gxeigrzsvetatjerdq5szmuygurwjqv@urnarutthtqz \
--to=w.bumiller@proxmox.com \
--cc=d.csapak@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox