Fixes CVE-2026-59171

This commit is contained in:
Damien Warren
2026-07-03 09:21:58 -07:00
parent c91d821dbe
commit ab92bb9088
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); char initial = string.charAt(0);
if ((initial >= '0' && initial <= '9') || initial == '-') { if ((initial >= '0' && initial <= '9') || initial == '-') {
try { try {
return stringToNumber(string); if (string.length() <= 1000) {
return stringToNumber(string);
}
} catch (Exception ignore) { } catch (Exception ignore) {
// Do nothing // Do nothing
} }
+3 -1
View File
@@ -650,7 +650,9 @@ public class XML {
char initial = string.charAt(0); char initial = string.charAt(0);
if ((initial >= '0' && initial <= '9') || initial == '-') { if ((initial >= '0' && initial <= '9') || initial == '-') {
try { try {
return stringToNumber(string); if(string.length() <= 1000) {
return stringToNumber(string);
}
} catch (Exception ignore) { } catch (Exception ignore) {
} }
} }
File diff suppressed because one or more lines are too long