Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/signed-xml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,11 @@ export class SignedXml {
valid(ated). Put simply: if one fails, they are all not trustworthy.
*/
this.signedReferences = [];
this.references.forEach((ref) => {
ref.signedReference = undefined;
});
// TODO: add this breaking change here later on for even more security: `this.references = [];`

if (callback) {
callback(new Error("Could not validate all references"), false);
return;
Expand Down Expand Up @@ -358,6 +362,9 @@ export class SignedXml {
// but that may cause some breaking changes, so we'll handle that in v7.x.
// If we were validating `signedInfoCanon` first, we wouldn't have to reset this array.
this.signedReferences = [];
this.references.forEach((ref) => {
ref.signedReference = undefined;
});
// TODO: add this breaking change here later on for even more security: `this.references = [];`

if (callback) {
Expand Down