Skip to content

Reject a location.reference that doesn't select an element #629

Description

@cjbarth

Split out of #583. In 6.3.3, #583 fixes the errors for location.reference values that already throw. This issue is the other half of its suggested fix: refusing a location.reference that doesn't select an element.

Today, before and after accept a text node, a comment or a processing instruction and put the Signature next to it. Probed on master at c13e30b, signing <root id="x"><a>t</a>text<!--c--><?pi d?></root>:

location.reference selects append / prepend before / after
a text node xmldom Hierarchy request error signs
a comment xmldom Hierarchy request error signs
a processing instruction xmldom Hierarchy request error signs

Proposal

Throw a named error from computeSignature() when location.reference selects anything other than an element, whatever the action.

Why 7.0

before and after with these nodes sign today.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    breaking-changeCan break existing callers; needs a major release. Stands alone or flags another kindbugWrong behavior: the report of it, the fix, or the revert of a fixsemver-major

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions