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

passport-saml

Package Overview
Dependencies
Maintainers
4
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

passport-saml - npm Package Compare versions

Comparing version 0.31.0 to 0.32.1

31

lib/passport-saml/saml.js

@@ -805,2 +805,9 @@ var zlib = require('zlib');

}
if (self.options.audience) {
var audienceErr = self.checkAudienceValidityError(
self.options.audience, conditions.AudienceRestriction);
if(audienceErr)
throw audienceErr;
}

@@ -873,2 +880,24 @@ var attributeStatement = assertion.AttributeStatement;

SAML.prototype.checkAudienceValidityError = function(expectedAudience, audienceRestrictions) {
var self = this;
if (!audienceRestrictions || audienceRestrictions.length < 1) {
return new Error('SAML assertion has no AudienceRestriction');
}
var errors = audienceRestrictions.map(function(restriction) {
if (!restriction.Audience || !restriction.Audience[0]) {
return new Error('SAML assertion AudienceRestriction has no Audience value');
}
if (restriction.Audience[0] !== expectedAudience) {
return new Error('SAML assertion audience mismatch');
}
return null;
}).filter(function(result) {
return result !== null;
});
if (errors.length > 0) {
return errors[0];
}
return null;
};
SAML.prototype.validatePostRequest = function (container, callback) {

@@ -899,3 +928,3 @@ var self = this;

callback(err);
})
});
});

@@ -902,0 +931,0 @@ };

2

package.json
{
"name": "passport-saml",
"version": "0.31.0",
"version": "0.32.1",
"license" : "MIT",

@@ -5,0 +5,0 @@ "keywords": [

@@ -55,2 +55,3 @@ Passport-SAML

* `issuer`: issuer string to supply to identity provider
* `audience`: expected saml response Audience (if not provided, Audience won't be verified)
* `cert`: see [Security and signatures](#security-and-signatures)

@@ -172,3 +173,3 @@ * `privateCert`: see [Security and signatures](#security-and-signatures)

For more detailed instructions, see [ADSF documentation](docs/adfs/README.md).
For more detailed instructions, see [ADFS documentation](docs/adfs/README.md).

@@ -232,2 +233,6 @@ ## SAML Response Validation - NotBefore and NotOnOrAfter

## ChangeLog
See [Releases](https://github.com/bergie/passport-saml/releases) to find the changes that go into each release.
## FAQ

@@ -234,0 +239,0 @@

Sorry, the diff of this file is too big to display

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