all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH common 0/3] fix #7612
@ 2026-10-08 13:48 Dominik Csapak
  2026-10-08 13:48 ` [PATCH common 1/3] json schema: reorder imports to our style guide Dominik Csapak
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Dominik Csapak @ 2026-10-08 13:48 UTC (permalink / raw)
  To: pve-devel

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





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-10-08 13:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-08 13:48 [PATCH common 0/3] fix #7612 Dominik Csapak
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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal