Fixes CVE-2026-59171
This commit is contained in:
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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
Reference in New Issue
Block a user