Repository navigation
fix(domain): read a deck group position too large to hold as none - #658
Merged
Merged
Conversation
A deck group's sm:position is an xsd:integer of 0 or more, and the reader dropped only a negative one. A valid integer too large for a JavaScript number read as Infinity, or as a rounded number, and stayed on the group. Renaming the group, or moving a deck into it, wrote that value back, and the write check refused the result, so the edit failed until the group itself was moved. A position now counts only when it is a whole number of 0 or more that a number holds exactly. Any other is read as none, for a group and a deck alike, so the node sorts last and a group written again is written without it, or renumbered when its level is reordered. Refs: GHSA-438g-wf4q-xj9g
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.
What and why
A deck group's
sm:positionis anxsd:integerof 0 or more, and the reader dropped only a negative one. A valid integer too large for a JavaScript number read asInfinity, or as a rounded number, and stayed on the group. Renaming the group, or moving a deck into it, wrote that value back, and the write check refused the result, so the edit failed until the group itself was moved.usablePosition). Any other reads as none, for a group and a deck alike.docs/data-model.mdstates the rule.Refs: GHSA-438g-wf4q-xj9g