Repository navigation
JSE-85: report relationships to external targets ('externalTarget') - #144
Merged
Merged
Conversation
…'externalTarget' A relationship with TargetMode="External" in any relationships part of the package that is not a hyperlink and that no other kind covers (a linked OLE object stays oleObject, an external link's own path stays externalLink) is now reported by the package scan, so read, inspect and importDataset all return it. Example: a linked picture under a drawing with an http(s), UNC or file: target, which Excel fetches when the file is opened. One warning for the whole package: part is the first relationships part holding one, parts lists each such relationships part once (bounded by maxEntries), and the new relationshipTypes field gives the first 16 distinct types, excerpted. Targets are never included, resolved or fetched. No new refusals.
…ships - Every non-hyperlink relationship read as external now gives externalTarget whatever its kind: a linked OLE object, an external link's path, connections, queryTable, control, package and image get it next to their own kind. The exemptions by kind and for external link paths (and their dependence on walk order) are gone. - Also reported, while the model still reads the target as a part name: a TargetMode that is neither Internal nor External; a second, prefixed or differently cased TargetMode; an internal target, or a second or prefixed Target, that starts with a URI scheme or // or contains a backslash. One pass over each Relationship's attributes as written. - Hyperlinks stay exempt everywhere. No new refusals. - docs/api.md (5.2, warning table, inspect example, security table), warnings.ts and the changeset follow.
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.
JSE-85. Before this change, a relationship with TargetMode="External" whose type was not an already-reported kind never reached the consumer. Example: a linked picture, an
imagerelationship of a drawing with an http(s), UNC or file: target. Excel fetches the target when the file is opened (a tracking beacon, or an NTLM leak through UNC).What changes (fail closed)
Relationship.outside). This covers://, or contains a backslash.part: the first relationships part that holds one.parts: each such relationships part once, so at most maxEntries.relationshipTypes(new optional field on ExcelWarning): the first 16 distinct types, excerpted.Tests
Not in this PR: F2 (a hyperlink-typed relationship used by a drawing's r:link) and F4. Tickets will be filed separately.