From 0a57ba4deb172c6ebed33083eed00a3abd025e40 Mon Sep 17 00:00:00 2001 From: Rodrigo Nascimento Date: Thu, 5 Apr 2018 14:20:22 -0300 Subject: [PATCH] Update saml_utils.js --- packages/meteor-accounts-saml/saml_utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/meteor-accounts-saml/saml_utils.js b/packages/meteor-accounts-saml/saml_utils.js index 74468ad7f5b..30eec18b57b 100644 --- a/packages/meteor-accounts-saml/saml_utils.js +++ b/packages/meteor-accounts-saml/saml_utils.js @@ -413,7 +413,7 @@ SAML.prototype.validateResponse = function(samlResponse, relayState, callback) { } } - if (!profile.email && profile.nameID && profile.nameIDFormat && profile.nameIDFormat.value.indexOf('emailAddress') >= 0) { + if (!profile.email && profile.nameID && (profile.nameIDFormat && profile.nameIDFormat.value != null ? profile.nameIDFormat.value : profile.nameIDFormat).indexOf('emailAddress') >= 0) { profile.email = profile.nameID; } if (Meteor.settings.debug) {