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.
Split out of #583. In 6.3.3, #583 fixes the errors for
location.referencevalues that already throw. This issue is the other half of its suggested fix: refusing alocation.referencethat doesn't select an element.Today,
beforeandafteraccept a text node, a comment or a processing instruction and put theSignaturenext to it. Probed onmasterat c13e30b, signing<root id="x"><a>t</a>text<!--c--><?pi d?></root>:location.referenceselectsappend/prependbefore/afterHierarchy request errorHierarchy request errorHierarchy request errorProposal
Throw a named error from
computeSignature()whenlocation.referenceselects anything other than an element, whatever the action.Why 7.0
beforeandafterwith these nodes sign today.