Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Unified Diff: remoting/webapp/me2mom/remoting.js

Issue 7048020: Don't use letters in me2mom access code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_);
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698