mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-22 07:46:16 -04:00
Updated dependencies and fixed some code scanning findings
This commit is contained in:
parent
5d3c66f615
commit
61501a7cbc
6 changed files with 69 additions and 66 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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, "");
|
||||
|
||||
/**
|
||||
|
|
4
src/core/vendor/gost/gostCoding.mjs
vendored
4
src/core/vendor/gost/gostCoding.mjs
vendored
|
@ -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
|
||||
|
|
|
@ -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}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue