ui: set error mask: ensure that message is html-encoded

to avoid interpreting HTML in the message when displaying the mask.

Signed-off-by: Friedrich Weber <f.weber@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Friedrich Weber 2025-04-07 17:30:02 +02:00 committed by Thomas Lamprecht
parent f7f61002ee
commit 839b7d8c89
2 changed files with 3 additions and 2 deletions

View File

@ -116,7 +116,7 @@ Ext.define('PBS.TapeManagement.BackupOverview', {
Proxmox.Utils.setErrorMask(view, false);
} catch (error) {
Proxmox.Utils.setErrorMask(view, error.toString());
Proxmox.Utils.setErrorMask(view, Ext.htmlEncode(error.toString()));
}
},

View File

@ -597,7 +597,8 @@ Ext.define('PBS.TapeManagement.ChangerStatus', {
if (!use_cache) {
Proxmox.Utils.setErrorMask(view);
}
Proxmox.Utils.setErrorMask(me.lookup('content'), response.result.message.toString());
let msg = Ext.htmlEncode(response.result.message.toString());
Proxmox.Utils.setErrorMask(me.lookup('content'), msg);
}
me.scheduleReload(5000);