[js-embedded-discovery] 03/03: EDS-79 Don't read preferred idp, just because user selected it
Rod Widdowson
rdw at steadingsoftware.com
Thu Jan 19 10:01:49 EST 2017
This is an automated email from the git hooks/post-receive script.
rdw pushed a commit to branch master
in repository js-embedded-discovery.
View the commit online:
http://git.shibboleth.net/view/?p=js-embedded-discovery.git;a=commit;h=8e8dd70c5e23d38b248e85641b2fdf3393af395e
commit 8e8dd70c5e23d38b248e85641b2fdf3393af395e
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Thu Jan 19 14:54:09 2017 +0000
EDS-79 Don't read preferred idp, just because user selected it
https://issues.shibboleth.net/jira/browse/EDS-79
Apply supplied patch, alongside blade guard against undefined function.
---
src/javascript/idpselect.js | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/javascript/idpselect.js b/src/javascript/idpselect.js
index 3a1db41..cc5dc9e 100644
--- a/src/javascript/idpselect.js
+++ b/src/javascript/idpselect.js
@@ -1309,8 +1309,16 @@ function IdPSelectUI() {
// And then the cookie based ones
//
userSelectedIdPs = retrieveUserSelectedIdPs();
- for (i = offset, j=0; i < userSelectedIdPs.length && i < maxPreferredIdPs; i++, j++){
- idps.push(getIdPFor(userSelectedIdPs[j]));
+ for (i = offset, j=0; j < userSelectedIdPs.length && i < maxPreferredIdPs; j++){
+ var cur_idp = getIdPFor(userSelectedIdPs[j]);
+ if (typeof idps.indexOf === 'undefined') {
+ idps.push(cur_idp);
+ i++;
+ }
+ else if (idps.indexOf(cur_idp) === -1) {
+ idps.push(cur_idp);
+ i++;
+ }
}
return idps;
};
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list