Updated dependencies and fixed some code scanning findings

This commit is contained in:
n1474335 2023-03-13 17:51:25 +00:00
parent 5d3c66f615
commit 61501a7cbc
6 changed files with 69 additions and 66 deletions

View file

@ -827,7 +827,7 @@ class Utils {
htmlStr = recursiveRemove(/<script[^>]*>.*?<\/script[^>]*>/gi, htmlStr);
htmlStr = recursiveRemove(/<style[^>]*>.*?<\/style[^>]*>/gi, htmlStr);
}
return htmlStr.replace(/<[^>]+>/g, "");
return recursiveRemove(/<[^>]+>/g, htmlStr);
}

View file

@ -48,7 +48,7 @@ class PlistViewer extends Operation {
.replace(/<true\/>/g, m => "true")
.replace(/<\/plist>/g, "/plist")
.replace(/<date>.+<\/date>/g, m => `${m.slice(6, m.indexOf(/<\/integer>/g)-6)}`)
.replace(/<data>(\s|.)+?<\/data>/g, m => `${m.slice(6, m.indexOf(/<\/data>/g)-6)}`)
.replace(/<data>[\s\S]+?<\/data>/g, m => `${m.slice(6, m.indexOf(/<\/data>/g)-6)}`)
.replace(/[ \t\r\f\v]/g, "");
/**

View file

@ -311,7 +311,7 @@ var Hex = {// <editor-fold defaultstate="collapsed">
* @returns {CryptoOperationData} Decoded binary data
*/
decode: function (s, endean) {
s = s.replace(/[^A-fa-f0-9]/g, '');
s = s.replace(/[^A-Fa-f0-9]/g, '');
var n = Math.ceil(s.length / 2), r = new Uint8Array(n);
s = (s.length % 2 > 0 ? '0' : '') + s;
if (endean && ((typeof endean !== 'string') ||
@ -370,7 +370,7 @@ var Int16 = {// <editor-fold defaultstate="collapsed">
* @returns {CryptoOperationData} Decoded binary data
*/
decode: function (s) {
s = (s || '').replace(/[^\-A-fa-f0-9]/g, '');
s = (s || '').replace(/[^\-A-Fa-f0-9]/g, '');
if (s.length === 0)
s = '0';
// Signature

View file

@ -38,7 +38,7 @@ class HTMLCategory {
* @returns {string}
*/
toHtml() {
const catName = "cat" + this.name.replace(/[\s/-:_]/g, "");
const catName = "cat" + this.name.replace(/[\s/\-:_]/g, "");
let html = `<div class="panel category">
<a class="category-title" data-toggle="collapse" data-target="#${catName}">
${this.name}