Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / resources / cryptotoken / gstaticorigincheck.js
index ec2ae56..8ea48b5 100644 (file)
@@ -41,7 +41,9 @@ GstaticOriginChecker.prototype.checkAppId_ = function(origin, appId) {
     // Trivially allowed
     return true;
   }
-  if (/google.com$/.test(origin)) {
+  var anchor = document.createElement('a');
+  anchor.href = origin;
+  if (/google.com$/.test(anchor.hostname)) {
     return (appId.indexOf('https://www.gstatic.com') == 0 ||
         appId.indexOf('https://static.corp.google.com') == 0);
   }