Index: remoting/webapp/me2mom/remoting.js |
diff --git a/remoting/webapp/me2mom/remoting.js b/remoting/webapp/me2mom/remoting.js |
index 2f364c11514bc9cdf509a4438a854a45bdf54dd3..2a8e64c2c9fea5f0e7436abbd6a74767ba37090b 100644 |
--- a/remoting/webapp/me2mom/remoting.js |
+++ b/remoting/webapp/me2mom/remoting.js |
@@ -255,8 +255,12 @@ function parseServerResponse_(reply, xhr) { |
showConnectError_(xhr.status, xhr.responseText); |
} |
+function normalizeAccessToken(accessCode) { |
Jamie
2011/05/20 01:28:21
Do we need to do this at the client? Since we do i
Jamie
2011/05/20 01:32:50
Actually, I retract that. We should only be doing
Jamie
2011/05/20 07:46:20
And while we're at it, can we remove one of 5 and
|
+ return accessCode.toUpperCase().replace("I", "1").replace("O", "0"); |
+} |
+ |
function tryConnect(form) { |
- remoting.accessCode = form['access_code_entry'].value; |
+ remoting.accessCode = normalizeAccessToken(form['access_code_entry'].value); |
// TODO(jamiewalch): Since the mapping from (SupportId, HostSecret) to |
// AccessCode is not yet defined, assume it's hyphen-separated for now. |
var parts = remoting.accessCode.split('-'); |
@@ -266,7 +270,7 @@ function tryConnect(form) { |
setClientMode('connecting'); |
var urlBase = 'https://www.googleapis.com/chromoting/v1/support-hosts/'; |
remoting.oauth.sendSignedRequest( |
- urlBase + '' + encodeURIComponent(parts[0]) + '', |
+ urlBase + encodeURIComponent(parts[0]), |
parseServerResponse_); |
} |
} |