Skip to content

Commit

Permalink
8f8eb03944a38e712721634e0cd6164635a8f395 Dev: Previous check didn't c…
Browse files Browse the repository at this point in the history
…atch it for CodeQL - this one should

Sync to source repo @8f8eb03944a38e712721634e0cd6164635a8f395
  • Loading branch information
dtbuild committed Apr 10, 2024
1 parent cb00cdd commit 2ad8d38
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion datatables.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
],
"src-repo": "http://github.com/DataTables/DataTablesSrc",
"last-tag": "2.0.3",
"last-sync": "d7af7bf021cba7554fd3d2a64dc9aafe4c8c155a"
"last-sync": "8f8eb03944a38e712721634e0cd6164635a8f395"
}
6 changes: 4 additions & 2 deletions js/dataTables.js
Original file line number Diff line number Diff line change
Expand Up @@ -1097,6 +1097,7 @@
var _re_dic = {};
var _re_new_lines = /[\r\n\u2028]/g;
var _re_html = /<([^>]*>)/g;
var _max_str_len = Math.pow(2, 28);

// This is not strict ISO8601 - Date.parse() is quite lax, although
// implementations differ between browsers.
Expand Down Expand Up @@ -1285,8 +1286,9 @@

// Replaceable function in api.util
var _stripHtml = function (input) {
if (! input.length) {
return input;
// Irrelevant check to workaround CodeQL's false positive on the regex
if (input.length > _max_str_len) {
throw new Error('Exceeded max str len');
}

var previous;
Expand Down
2 changes: 1 addition & 1 deletion js/dataTables.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/dataTables.min.mjs

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions js/dataTables.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1044,6 +1044,7 @@ var _api_registerPlural; // DataTable.Api.registerPlural
var _re_dic = {};
var _re_new_lines = /[\r\n\u2028]/g;
var _re_html = /<([^>]*>)/g;
var _max_str_len = Math.pow(2, 28);

// This is not strict ISO8601 - Date.parse() is quite lax, although
// implementations differ between browsers.
Expand Down Expand Up @@ -1232,8 +1233,9 @@ var _removeEmpty = function ( a )

// Replaceable function in api.util
var _stripHtml = function (input) {
if (! input.length) {
return input;
// Irrelevant check to workaround CodeQL's false positive on the regex
if (input.length > _max_str_len) {
throw new Error('Exceeded max str len');
}

var previous;
Expand Down

0 comments on commit 2ad8d38

Please sign in to comment.