diff --git a/lib/passport-saml/saml.js b/lib/passport-saml/saml.js index 09e5ec99..338eaec8 100644 --- a/lib/passport-saml/saml.js +++ b/lib/passport-saml/saml.js @@ -319,7 +319,7 @@ SAML.prototype.validateSignature = function (fullXml, currentNode, cert) { SAML.prototype.validatePostResponse = function (container, callback) { var self = this; - var xml = new Buffer(container.SAMLResponse, 'base64').toString('ascii'); + var xml = new Buffer(container.SAMLResponse, 'base64').toString('utf8'); var doc = new xmldom.DOMParser().parseFromString(xml); var inResponseTo = xpath(doc, "/*[local-name()='Response']/@InResponseTo"); @@ -628,7 +628,7 @@ SAML.prototype.checkTimestampsValidityError = function(nowMs, notBefore, notOnOr SAML.prototype.validatePostRequest = function (container, callback) { var self = this; - var xml = new Buffer(container.SAMLRequest, 'base64').toString('ascii'); + var xml = new Buffer(container.SAMLRequest, 'base64').toString('utf8'); var parserConfig = { explicitRoot: true, tagNameProcessors: [xml2js.processors.stripPrefix] diff --git a/package.json b/package.json index a90d475a..c676c4cc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "passport-saml", - "version": "0.5.2", + "version": "0.5.3", "licenses": [ { "type": "MIT", @@ -31,7 +31,7 @@ "main": "./lib/passport-saml", "dependencies": { "passport": "0.2.x", - "q" : "1.0.x", + "q": "1.0.x", "xml2js": "0.4.x", "xml-crypto": "0.1.x", "xmldom": "0.1.x",