From 0b35e06e90e6e6adf2fe403bce7a297bb7086370 Mon Sep 17 00:00:00 2001 From: Lloyd Hilaiel <lloyd@hilaiel.com> Date: Wed, 8 Feb 2012 10:36:42 -0700 Subject: [PATCH] update to latest jschannel which supports underbars in hostnames. closes #1074 --- resources/static/include_js/include.js | 8 ++++---- resources/static/lib/jschannel.js | 2 +- resources/static/provisioning_api.js | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/resources/static/include_js/include.js b/resources/static/include_js/include.js index 8b3679952..e835b8bd2 100644 --- a/resources/static/include_js/include.js +++ b/resources/static/include_js/include.js @@ -8,7 +8,7 @@ (function() { // this is the file that the RP includes to shim in the // navigator.id.getVerifiedEmail() function -// "use strict"; + // "use strict"; // local embedded copy of jschannel: http://github.com/mozilla/jschannel /** @@ -48,7 +48,7 @@ * + string method * + (optional) any params */ - var Channel = (function() { + var Channel = (function() { "use strict"; // current transaction id, start out at a random *odd* number between 1 and a million @@ -262,7 +262,7 @@ var oMatch; if (cfg.origin === "*") validOrigin = true; // allow valid domains under http and https. Also, trim paths off otherwise valid origins. - else if (null !== (oMatch = cfg.origin.match(/^https?:\/\/(?:[-a-zA-Z0-9\.])+(?::\d+)?/))) { + else if (null !== (oMatch = cfg.origin.match(/^https?:\/\/(?:[-a-zA-Z0-9_\.])+(?::\d+)?/))) { cfg.origin = oMatch[0].toLowerCase(); validOrigin = true; } @@ -354,7 +354,7 @@ } }, timeout); } - + var onMessage = function(origin, method, m) { // if an observer was specified at allocation time, invoke it if (typeof cfg.gotMessageObserver === 'function') { diff --git a/resources/static/lib/jschannel.js b/resources/static/lib/jschannel.js index 86a9f5962..ad70c3344 100644 --- a/resources/static/lib/jschannel.js +++ b/resources/static/lib/jschannel.js @@ -250,7 +250,7 @@ var oMatch; if (cfg.origin === "*") validOrigin = true; // allow valid domains under http and https. Also, trim paths off otherwise valid origins. - else if (null !== (oMatch = cfg.origin.match(/^https?:\/\/(?:[-a-zA-Z0-9\.])+(?::\d+)?/))) { + else if (null !== (oMatch = cfg.origin.match(/^https?:\/\/(?:[-a-zA-Z0-9_\.])+(?::\d+)?/))) { cfg.origin = oMatch[0].toLowerCase(); validOrigin = true; } diff --git a/resources/static/provisioning_api.js b/resources/static/provisioning_api.js index 7b679e784..68849b40f 100644 --- a/resources/static/provisioning_api.js +++ b/resources/static/provisioning_api.js @@ -44,7 +44,7 @@ * + string method * + (optional) any params */ - var Channel = (function() { + var Channel = (function() { "use strict"; // current transaction id, start out at a random *odd* number between 1 and a million @@ -258,7 +258,7 @@ var oMatch; if (cfg.origin === "*") validOrigin = true; // allow valid domains under http and https. Also, trim paths off otherwise valid origins. - else if (null !== (oMatch = cfg.origin.match(/^https?:\/\/(?:[-a-zA-Z0-9\.])+(?::\d+)?/))) { + else if (null !== (oMatch = cfg.origin.match(/^https?:\/\/(?:[-a-zA-Z0-9_\.])+(?::\d+)?/))) { cfg.origin = oMatch[0].toLowerCase(); validOrigin = true; } @@ -350,7 +350,7 @@ } }, timeout); } - + var onMessage = function(origin, method, m) { // if an observer was specified at allocation time, invoke it if (typeof cfg.gotMessageObserver === 'function') { -- GitLab