Skip to content

Commit bc87389

Browse files
authored
Merge commit from fork
* throw exception upon canonicalization error * attribute change
1 parent 2bdfd74 commit bc87389

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

CHANGELOG.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
xmlseclibs.php
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3+
08, Dec 2025, 3.1.4
4+
Security:
5+
- fix canonicalization bypass error (d0ge)
6+
37
20, Nov 2024, 3.1.3
48
Bug Fixes:
59
- remove loadKey check due to BC issues

src/XMLSecurityDSig.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,11 @@ private function canonicalizeData($node, $canonicalmethod, $arXPath=null, $prefi
293293
}
294294
}
295295

296-
return $node->C14N($exclusive, $withComments, $arXPath, $prefixList);
296+
$ret = $node->C14N($exclusive, $withComments, $arXPath, $prefixList);
297+
if ($ret === false) {
298+
throw new Exception("Canonicalization failed");
299+
}
300+
return $ret;
297301
}
298302

299303
/**

0 commit comments

Comments
 (0)