Skip to content

Commit

Permalink
fix(ie): IE11 log in works for ports 80 and 443
Browse files Browse the repository at this point in the history
Fixes logging in with IE11 when using well-known port numbers 80 and 443 where otherwise isSameOrigin() fails because of an IE bug.

closes #1880, #1896
  • Loading branch information
erikrenberg authored and Awk34 committed May 25, 2016
1 parent c5f2641 commit 414b80a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion templates/app/client/components/util/util.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,10 @@ function UtilService($window) {
origins.push($window.location);
origins = origins.filter(function(o) {
return url.hostname === o.hostname &&
url.port === o.port &&
// 2nd part of the special treatment for IE fix (see above):
// This part is when using well-known ports 80 or 443 with IE, when $window.location.port==='' instead of the real port number. Probably the same cause as this IE bug:
// https://connect.microsoft.com/IE/feedback/details/817343/ie11-scripting-value-of-htmlanchorelement-host-differs-between-script-created-link-and-link-from-document
(url.port === o.port || (o.port === '' && (url.port === '80' || url.port === '443'))) &&
url.protocol === o.protocol;
});
return (origins.length >= 1);
Expand Down

0 comments on commit 414b80a

Please sign in to comment.