From 3d92bbd5156e7e578a5b77a6bfe8e920731d96d2 Mon Sep 17 00:00:00 2001 From: Michal Fox Date: Sat, 3 Oct 2026 02:58:10 +0200 Subject: [PATCH] utils: safe id regex: do not allow backslashes The comment says the regex is the same as SAFE_ID_REGEX in proxmox-schema, but the character class has an additional backslash. It was there since the regex was added, as '\\-' in a regex literal matches a backslash and a hyphen, and the reordering for the linter kept it. So the UI accepts a webhook endpoint name like 'a\b', which the API then rejects as it does not match the schema. Drop the backslash, so that the field shows the name as invalid right away. Signed-off-by: Michal Fox --- src/Utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Utils.js b/src/Utils.js index a2c4269..e05afe5 100644 --- a/src/Utils.js +++ b/src/Utils.js @@ -1754,7 +1754,7 @@ Ext.define('Proxmox.Utils', { me.httpUrlRegex = new RegExp(HTTP_URL_REGEX); // Same as SAFE_ID_REGEX in proxmox-schema - me.safeIdRegex = /^(?:[A-Za-z0-9_][A-Za-z0-9._\-\\]*)$/; + me.safeIdRegex = /^(?:[A-Za-z0-9_][A-Za-z0-9._-]*)$/; }, });