-
Notifications
You must be signed in to change notification settings - Fork 0
Comparing changes
Open a pull request
base repository: mechko/JSON-java
base: master
head repository: stleary/JSON-java
compare: master
- 20 commits
- 11 files changed
- 5 contributors
Commits on Jul 13, 2026
-
1063-option-3 parserConfig set max len
Sean Leary authored and Sean Leary committedJul 13, 2026 Configuration menu - View commit details
-
Copy full SHA for 90563eb - Browse repository at this point
Copy the full SHA 90563ebView commit details
Commits on Jul 14, 2026
-
stleary#1063: bound BigDecimal->BigInteger expansion in objectToBigIn…
…teger Completes the CVE-2026-59171 fix started in ab92bb9 / stleary#1065. The 1000-char length guard in stringToValue admits short exponent-notation literals (e.g. 1e100000000, 11 chars) which are stored compactly as BigDecimal and only expand when getBigInteger/optBigInteger calls BigDecimal.toBigInteger(), materialising ~10^8 digits and stalling the thread or throwing OOM. Guard both toBigInteger() sites in objectToBigInteger by rejecting any BigDecimal whose integer part would exceed ParserConfiguration.DEFAULT_MAX_NUMBER_LENGTH decimal digits (precision() - scale(), both O(1) reads). Returns defaultValue on overflow, matching the method's existing behaviour for non-finite and unparseable values. Covers JSONObject.getBigInteger/optBigInteger and JSONArray.getBigInteger/optBigInteger (all delegate to this helper). Adds JSONObjectTest.getBigIntegerHugeExponentReturnsDefault with a 5s timeout so a regression fails fast rather than hanging CI. Co-Authored-By: Claude <noreply@anthropic.com>
Configuration menu - View commit details
-
Copy full SHA for fce83c9 - Browse repository at this point
Copy the full SHA fce83c9View commit details -
stleary#1063: add comment to expected-exception catch block (SonarClo…
…ud java:S108) Co-Authored-By: Claude <noreply@anthropic.com>
Configuration menu - View commit details
-
Copy full SHA for e40d933 - Browse repository at this point
Copy the full SHA e40d933View commit details
Commits on Jul 16, 2026
-
stleary#1063: add JSONParserConfiguration overloads for getBigInteger…
…/optBigInteger Per review on stleary#1067: - objectToBigInteger(val, dflt, JSONParserConfiguration) uses cfg.getMaxNumberLength() for the digit-count guard; -1 disables it. Existing 2-arg form delegates with a default config. - New public overloads on JSONObject and JSONArray: getBigInteger(key, cfg) / optBigInteger(key, dflt, cfg). Existing methods delegate with a default config. - objectToBigDecimal left unchanged (no expansion path; agreed on PR). - Tests cover default (1000), raised (2000), lowered (5), disabled (-1), null config, and JSONArray overloads. Co-Authored-By: Claude <noreply@anthropic.com>
Configuration menu - View commit details
-
Copy full SHA for 703ac34 - Browse repository at this point
Copy the full SHA 703ac34View commit details -
Merge pull request stleary#1067 from mechko/1063-biginteger-exponent-dos
stleary#1063: bound BigDecimal→BigInteger expansion in objectToBigInteger (completes CVE-2026-59171 fix)
Configuration menu - View commit details
-
Copy full SHA for a28328c - Browse repository at this point
Copy the full SHA a28328cView commit details -
max-number-length-config sonarqube fixes
Sean Leary authored and Sean Leary committedJul 16, 2026 Configuration menu - View commit details
-
Copy full SHA for 9953b76 - Browse repository at this point
Copy the full SHA 9953b76View commit details
Commits on Jul 19, 2026
-
Merge pull request stleary#1068 from stleary/max-number-length-config
Max number length config for BigInteger and BigDecimal
Configuration menu - View commit details
-
Copy full SHA for 80efb52 - Browse repository at this point
Copy the full SHA 80efb52View commit details -
pre-release-20260719 initial commit
Sean Leary authored and Sean Leary committedJul 19, 2026 Configuration menu - View commit details
-
Copy full SHA for d24bc9e - Browse repository at this point
Copy the full SHA d24bc9eView commit details -
pre-release-20260719 oops forgot to update new unit tests for strict …
…mode
Sean Leary authored and Sean Leary committedJul 19, 2026 Configuration menu - View commit details
-
Copy full SHA for da757c6 - Browse repository at this point
Copy the full SHA da757c6View commit details -
Merge pull request stleary#1069 from stleary/pre-release-20260719
20260719 prep for next release
Configuration menu - View commit details
-
Copy full SHA for 1795e8c - Browse repository at this point
Copy the full SHA 1795e8cView commit details
Commits on Jul 20, 2026
-
Fix XML.unescape rejecting valid whitespace numeric character references
XML.mustEscape() is shared by both XML.escape() (serialization) and XMLTokener.unescapeEntity() (deserialization). While the method's Javadoc and comment quote the W3C XML 1.0 valid-character range (#x9 | #xA | #xD | [#x20-#xD7FF] | ...), the implementation only checked [#x20-#xD7FF] in its range clause, omitting #x9/#xA/#xD. Although the ISO-control clause excluded those three codepoints, the negated range clause still marked them as 'must escape', so unescapeEntity() threw JSONException for the XML-allowed control characters TAB, LF and CR. This broke XML.unescape("&stleary#10;") and XML.toJSONObject("<a>&stleary#10;</a>"), both of which worked in v20251224 and regressed after stleary#1045 (v20260522). Align the range clause with the W3C spec by explicitly allowing #x9, #xA and #xD, matching the comment that was already documented. Fixes stleary#1059Configuration menu - View commit details
-
Copy full SHA for 94854a1 - Browse repository at this point
Copy the full SHA 94854a1View commit details
Commits on Jul 23, 2026
-
stleary#1071: reject invalid XML element names in XML.toString (CWE-91)
XML.toString emitted JSONObject keys verbatim as tag names, so a key containing '<', '>' or '/' broke out of its element and injected arbitrary sibling structure into the output. Per stleary#294/stleary#123 the agreed approach is to throw on invalid input rather than mangle it. - Add mustBeXmlName / isXmlNameStart / isXmlNameChar implementing the XML 1.0 (5th ed.) Name production, code-point aware. - Validate tagName at method entry and each key at the top of the key loop (skipping the cDataTagName sentinel). - Rewrite XMLTest.shouldHandleIllegalJSONNodeNames and XMLConfigurationTest.shouldHandleIllegalJSONNodeNames (previously documenting the pass-through behaviour) to assert the throw. - Add XMLTest.toStringRejectsElementInjectionInKey covering the stleary#1071 payload and an invalid caller-supplied tagName. - Add XMLTest.toStringAcceptsValidXmlNames covering hyphen/dot/ underscore/colon, Latin-1 letters, and the cDataTagName sentinel. Fixes stleary#1071. Also resolves the long-standing well-formedness question in stleary#166 / stleary#294 / stleary#308. Co-Authored-By: Claude <noreply@anthropic.com>
Configuration menu - View commit details
-
Copy full SHA for e2cfb5a - Browse repository at this point
Copy the full SHA e2cfb5aView commit details
Commits on Jul 24, 2026
-
stleary#1071: extract inRange helper to satisfy Sonar S3776
isXmlNameStart's alternating &&/|| chain scored cognitive complexity 28. Extracting inRange(cp, lo, hi) collapses it to a flat || sequence and keeps the range list 1:1 with the XML 1.0 NameStartChar production. isXmlNameChar updated the same way. No behaviour change. Co-Authored-By: Claude <noreply@anthropic.com>
Configuration menu - View commit details
-
Copy full SHA for 6b993e2 - Browse repository at this point
Copy the full SHA 6b993e2View commit details
Commits on Jul 29, 2026
-
Merge pull request stleary#1070 from dong0713/fix/xml-unescape-whites…
…pace-control-chars Fix XML.unescape rejecting valid whitespace numeric character references
Configuration menu - View commit details
-
Copy full SHA for b594a32 - Browse repository at this point
Copy the full SHA b594a32View commit details
Commits on Jul 31, 2026
-
Configuration menu - View commit details
-
Copy full SHA for 392a352 - Browse repository at this point
Copy the full SHA 392a352View commit details -
Configuration menu - View commit details
-
Copy full SHA for 22ab2fb - Browse repository at this point
Copy the full SHA 22ab2fbView commit details
Commits on Aug 14, 2026
-
pre-release-20260814 initial commit
Sean Leary authored and Sean Leary committedAug 14, 2026 Configuration menu - View commit details
-
Copy full SHA for 34efda6 - Browse repository at this point
Copy the full SHA 34efda6View commit details -
Merge pull request stleary#1073 from stleary/pre-release-20260814
20260814 prep for next release
Configuration menu - View commit details
-
Copy full SHA for 6c14048 - Browse repository at this point
Copy the full SHA 6c14048View commit details
Commits on Aug 20, 2026
-
stleary#1071: narrow tag-name check to XML metachars only
Per review on stleary#1072: reject only < > & " ' / in element names to close the CWE-91 injection vector, and drop the full XML 1.0 Name validation to preserve backwards compatibility for callers that emit non-well-formed but non-injecting tag names. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MTGnYg5v1QxaqqfDKHKTVr
Configuration menu - View commit details
-
Copy full SHA for 3dd0ec0 - Browse repository at this point
Copy the full SHA 3dd0ec0View commit details
Commits on Aug 24, 2026
-
Merge pull request stleary#1072 from mechko/1071-xml-tostring-name-va…
…lidation stleary#1071: reject invalid XML element names in XML.toString (CWE-91)
Configuration menu - View commit details
-
Copy full SHA for 4f859fd - Browse repository at this point
Copy the full SHA 4f859fdView commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff master...master