From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 5AF261FF0AF for ; Thu, 08 Oct 2026 15:52:37 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 42BD4215F9; Thu, 08 Oct 2026 15:52:29 +0200 (CEST) From: Dominik Csapak To: pve-devel@lists.proxmox.com Subject: [PATCH common 0/3] fix #7612 Date: Thu, 8 Oct 2026 15:48:10 +0200 Message-ID: <20261008135224.3323985-1-d.csapak@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.375 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: L5XHOR2HRSZQ2YHLSP4RL74IIYIAWE26 X-Message-ID-Hash: L5XHOR2HRSZQ2YHLSP4RL74IIYIAWE26 X-MailFrom: d.csapak@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: 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