diff --git a/js/common.js b/js/common.js index 30af9c12..5c82259e 100644 --- a/js/common.js +++ b/js/common.js @@ -659,14 +659,12 @@ export async function uninstallNodes(nodeList, options = {}) { }); if (res.status != 200) { - errorMsg = `'${nodeItem.title || nodeItem.name}': `; + errorMsg = `'${sanitizeHTML(String(nodeItem.title || nodeItem.name))}': `; if (res.status == 403) { errorMsg += `This action is not allowed with this security level configuration.\n`; - } else if (res.status == 404) { - errorMsg += `With the current security level configuration, only custom nodes from the "default channel" can be uninstalled.\n`; } else { - errorMsg += await res.text() + '\n'; + errorMsg += sanitizeHTML(await res.text()) + '\n'; } break; diff --git a/js/custom-nodes-manager.js b/js/custom-nodes-manager.js index 9b7917e6..1963ae60 100644 --- a/js/custom-nodes-manager.js +++ b/js/custom-nodes-manager.js @@ -1467,7 +1467,7 @@ export class CustomNodesManager { }); if (res.status != 200) { - errorMsg = `'${item.title}': `; + errorMsg = `'${sanitizeHTML(String(item.title))}': `; if(res.status == 403) { try { @@ -1480,10 +1480,8 @@ export class CustomNodesManager { } catch { errorMsg += `This action is not allowed with this security level configuration.\n`; } - } else if(res.status == 404) { - errorMsg += `With the current security level configuration, only custom nodes from the "default channel" can be installed.\n`; } else { - errorMsg += await res.text() + '\n'; + errorMsg += sanitizeHTML(await res.text()) + '\n'; } break;