Skip to content

Commit

Permalink
Merge pull request #58 from CoorpAcademy/fix-responsebody-encoding
Browse files Browse the repository at this point in the history
Issue with accented caracters in xml
  • Loading branch information
ploer committed Sep 11, 2014
2 parents 91f3446 + 8595f68 commit bd8a76b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/passport-saml/saml.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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]
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "passport-saml",
"version": "0.5.2",
"version": "0.5.3",
"licenses": [
{
"type": "MIT",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit bd8a76b

Please sign in to comment.