Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

xml-crypto

Package Overview
Dependencies
Maintainers
3
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xml-crypto - npm Package Compare versions

Comparing version 1.1.2 to 1.1.3

0

example/example.js

@@ -0,0 +0,0 @@ var select = require('xml-crypto').xpath

@@ -0,0 +0,0 @@ var select = require('xpath').select

@@ -0,0 +0,0 @@ /* jshint laxcomma: true */

@@ -0,0 +0,0 @@ var xpath = require('xpath');

@@ -0,0 +0,0 @@ /* jshint laxcomma: true */

24

lib/signed-xml.js

@@ -481,3 +481,27 @@ var xpath = require('xpath')

var digest = hash.getHash(canonXml)
if (!validateDigestValue(digest, ref.digestValue)) {
if (ref.inclusiveNamespacesPrefixList) {
// fallback: apply InclusiveNamespaces workaround (https://github.com/yaronn/xml-crypto/issues/72)
var prefixList = ref.inclusiveNamespacesPrefixList instanceof Array ? ref.inclusiveNamespacesPrefixList : ref.inclusiveNamespacesPrefixList.split(' ');
var supported_definitions = {
'xs': 'http://www.w3.org/2001/XMLSchema',
'xsi': 'http://www.w3.org/2001/XMLSchema-instance',
'saml': 'urn:oasis:names:tc:SAML:2.0:assertion'
}
prefixList.forEach(function (prefix) {
if (supported_definitions[prefix]) {
elem[0].setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:' + prefix, supported_definitions[prefix]);
}
});
canonXml = this.getCanonXml(ref.transforms, elem[0], { inclusiveNamespacesPrefixList: ref.inclusiveNamespacesPrefixList });
digest = hash.getHash(canonXml);
if (digest === ref.digestValue) {
return true;
}
}
}
if (!validateDigestValue(digest, ref.digestValue)) {

@@ -484,0 +508,0 @@ this.validationErrors.push("invalid signature: for uri " + ref.uri +

@@ -0,0 +0,0 @@ var select = require('xpath').select

2

package.json
{
"name": "xml-crypto",
"version": "1.1.2",
"version": "1.1.3",
"description": "Xml digital signature and encryption library for Node.js",

@@ -5,0 +5,0 @@ "engines": {

@@ -0,0 +0,0 @@ ## xml-crypto

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc