-
Notifications
You must be signed in to change notification settings - Fork 0
fix(import): accept XML delimiter whitespace #467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
ededaee
fix(import): accept XML delimiter whitespace
seonghobae 3491f51
test(import): reject nested scalar elements
seonghobae dba36c9
fix(import): reject nested scalar elements
seonghobae 26e1c53
test(security): reproduce stale share project authority
seonghobae e818236
test(e2e): keep XML parser PR scope isolated
seonghobae 5e4922b
test(security): reject JWTs in attachment-view URLs
seonghobae 91651c8
test(security): execute attachment-view auth regression
seonghobae a14a3bd
chore(security): keep XML PR scoped to parser fix
seonghobae 766eb2d
chore(security): restore XML PR test surface
seonghobae 5c9a3f1
Merge branch 'develop' into fix/xml-tag-whitespace-410
opencode-agent[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| # Microsoft Project XML delimiter boundary | ||
|
|
||
| ## Decision | ||
|
|
||
| ScopeWeave's Microsoft Project import profile accepts XML whitespace between an | ||
| exact supported element name and the closing `>` delimiter. The accepted code | ||
| points are: | ||
|
|
||
| - U+0020 SPACE; | ||
| - U+0009 CHARACTER TABULATION; | ||
| - U+000D CARRIAGE RETURN; and | ||
| - U+000A LINE FEED. | ||
|
|
||
| The parser deliberately does not become a general XML processor. It recognizes | ||
| only the exact `Task`, `PredecessorLink`, and scalar element names already used | ||
| by the import adapter. Attributes, namespace prefixes, longer lookalike names, | ||
| non-XML whitespace, self-closing forms, nested same-name blocks, and truncated | ||
| blocks are rejected or yield no value under this narrow profile. | ||
|
|
||
| ## Security and complexity boundary | ||
|
|
||
| The scanner remains monotonic and regex-free. It advances through every rejected | ||
| candidate and uses bounded `indexOf()` and `slice()` operations rather than | ||
| constructing dynamic regular expressions or lazy whole-document block matches. | ||
| This preserves the existing denial-of-service boundary for malformed or | ||
| adversarial uploads. | ||
|
|
||
| An unmatched outer element cannot consume a later nested element's closing tag. | ||
| If another same-name opening appears before the candidate closing tag, block | ||
| collection stops at the unmatched outer element instead of silently producing a | ||
| mis-parented task. | ||
|
|
||
| ## Executable evidence | ||
|
|
||
| `tests/unit/msproject.test.mjs` covers: | ||
|
|
||
| - space, tab, carriage-return, and line-feed delimiters; | ||
| - scalar and predecessor-link elements using each allowed delimiter; | ||
| - an actual U+000B vertical tab, which is not XML whitespace; | ||
| - attributes and longer element names; | ||
| - truncated and repeated unclosed task blocks; | ||
| - nested same-name openings before a closing element; and | ||
| - the existing valid import and predecessor contracts. | ||
|
|
||
| The test is already part of the full unit and coverage command paths. No package | ||
| or lockfile change is required. | ||
|
|
||
| ## Compatibility and rollback | ||
|
|
||
| The change broadens acceptance only for documents that are conformant with the | ||
| XML whitespace production at the delimiter positions used by this adapter. | ||
| Existing byte-exact exports retain the same task identifiers, names, dates, | ||
| parents, progress, and predecessor values. | ||
|
|
||
| Rollback must revert the scanner, focused tests, security documentation, | ||
| CHANGELOG entry, and this record together. Reintroducing byte-exact delimiters | ||
| would again reject standards-compliant Microsoft Project exports that contain | ||
| formatting whitespace before `>`. | ||
|
|
||
| ## Reference | ||
|
|
||
| World Wide Web Consortium. (2008). *Extensible Markup Language (XML) 1.0 | ||
| (Fifth Edition)*. https://www.w3.org/TR/2008/REC-xml-20081126/ |
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.