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

xml-crypto

Package Overview
Dependencies
Maintainers
4
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 2.0.0 to 2.1.0

16

lib/signed-xml.js

@@ -214,6 +214,7 @@ var xpath = require('xpath')

* @param {string} docSubsetXpath - xpath query to get document subset being canonicalized
* @param {object} namespaceResolver - xpath namespace resolver
* @returns {Array} i.e. [{prefix: "saml", namespaceURI: "urn:oasis:names:tc:SAML:2.0:assertion"}]
*/
function findAncestorNs(doc, docSubsetXpath){
var docSubset = xpath.select(docSubsetXpath, doc);
function findAncestorNs(doc, docSubsetXpath, namespaceResolver){
var docSubset = xpath.selectWithResolver(docSubsetXpath, doc, namespaceResolver);

@@ -446,3 +447,3 @@ if(!Array.isArray(docSubset) || docSubset.length < 1){

if(Array.isArray(ref.transforms)){
ref.ancestorNamespaces = findAncestorNs(doc, ref.xpath)
ref.ancestorNamespaces = findAncestorNs(doc, ref.xpath, this.namespaceResolver)
}

@@ -737,2 +738,9 @@

var existingPrefixes = opts.existingPrefixes || {};
this.namespaceResolver = {
lookupNamespaceURI: function(prefix) {
return existingPrefixes[prefix];
}
}
// defaults to the root node

@@ -880,3 +888,3 @@ location.reference = location.reference || "/*";

var ref = this.references[n]
, nodes = xpath.select(ref.xpath, doc)
, nodes = xpath.selectWithResolver(ref.xpath, doc, this.namespaceResolver)

@@ -883,0 +891,0 @@ if (nodes.length==0) {

{
"name": "xml-crypto",
"version": "2.0.0",
"version": "2.1.0",
"description": "Xml digital signature and encryption library for Node.js",

@@ -13,3 +13,3 @@ "engines": {

"dependencies": {
"xmldom": "0.1.27",
"xmldom": "0.5.0",
"xpath": "0.0.27"

@@ -16,0 +16,0 @@ },

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