Merge pull request #1065 from Damien-Warren-206/master

Fixes CVE-2026-59171
This commit is contained in:
Sean Leary
2026-07-06 12:23:25 -05:00
committed by GitHub
3 changed files with 4051 additions and 4115 deletions
+3 -1
View File
@@ -2700,7 +2700,9 @@ public class JSONObject {
char initial = string.charAt(0);
if ((initial >= '0' && initial <= '9') || initial == '-') {
try {
return stringToNumber(string);
if (string.length() <= 1000) {
return stringToNumber(string);
}
} catch (Exception ignore) {
// Do nothing
}
+3 -1
View File
@@ -650,7 +650,9 @@ public class XML {
char initial = string.charAt(0);
if ((initial >= '0' && initial <= '9') || initial == '-') {
try {
return stringToNumber(string);
if(string.length() <= 1000) {
return stringToNumber(string);
}
} catch (Exception ignore) {
}
}
File diff suppressed because one or more lines are too long