public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH common 0/3] fix #7612
Date: Thu,  8 Oct 2026 15:48:10 +0200	[thread overview]
Message-ID: <20261008135224.3323985-1-d.csapak@proxmox.com> (raw)

When editing various properties that are only marked as integer or
numbers without any maximum/minimum, an overly large value can land
in e.g. the guest config. When this value get's interpreted as a number
somewhere along the way to the API, perls JSON encoder prints those
as the bareword inf, which is not a valid JSON value and the UI
can't parse that (JSON.decode throws an exception).

Since such large values do not make sense to have anyway, fix
the 'is_number/integer' check in the JSONSchema to reject such values.

The first patch is just a cleanup, the second one adds test for the
status-quo and the third one changes the parser to reject overly large
integers. For this a new dependency is introduced (Scalar::Util::Numeric)

Dominik Csapak (3):
  json schema: reorder imports to our style guide
  json schema: add tests for numeric behavior
  fix #7612: json schema: don't allow integers that are too large

 debian/control           |   1 +
 src/PVE/JSONSchema.pm    |  28 ++++--
 test/json-schema-test.pl | 198 +++++++++++++++++++++++++++++++++++++++
 3 files changed, 219 insertions(+), 8 deletions(-)

-- 
2.47.3





             reply	other threads:[~2026-10-08 13:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-08 13:48 Dominik Csapak [this message]
2026-10-08 13:48 ` [PATCH common 1/3] json schema: reorder imports to our style guide Dominik Csapak
2026-10-08 13:48 ` [PATCH common 2/3] json schema: add tests for numeric behavior Dominik Csapak
2026-10-08 13:48 ` [PATCH common 3/3] fix #7612: json schema: don't allow integers that are too large Dominik Csapak

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=20261008135224.3323985-1-d.csapak@proxmox.com \
    --to=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
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal