Repository navigation
Conversation
big.Rat.SetString rejects a decimal exponent above 1000000. The normalizer only compared the exponent to the byte budget, so a value such as retryAfter: 1e1000001 reached JSON Schema minimum checks and nil-dereferenced. Return the existing limit error instead. An exponent of 1000000 still validates.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #334 +/- ##
=======================================
Coverage 98.66% 98.66%
=======================================
Files 94 94
Lines 12310 12310
=======================================
Hits 12146 12146
Misses 139 139
Partials 25 25
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ValidateBytespanics on an Arazzo document that contains a decimal exponentbig.Ratcannot parse.retryAfteris a number withminimum: 0. A value such as1e1000001passed the normalizer because the exponent was compared only with the 16MiB byte budget.math/big.Rat.SetStringaccepts an exponent of 1000000 and rejects 1000001. JSON Schema then nil-dereferences while comparing that number withminimum.The normalizer now returns the existing limit error for an absolute decimal exponent above 1000000, before schema validation. An exponent of 1000000 still validates. The byte budget check is unchanged.
TestFoundationCapsBeforeCompilationcoversretryAfter: 1e1000001,retryAfter: 1e-1000001, and the accepted boundary1e1000000.