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

Unified Diff: remoting/host/access_verifier.cc

Issue 6518012: Use case-insensitive comparison when comparing JIDs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/remoting/host
Patch Set: added test Created 9 years, 10 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 | remoting/host/access_verifier_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/access_verifier.cc
diff --git a/remoting/host/access_verifier.cc b/remoting/host/access_verifier.cc
index 62718162c7f315a9d7c623d870a3f755bddf0958..19397d63072e62a6a8ba7934e6627c86b2b9a525 100644
--- a/remoting/host/access_verifier.cc
+++ b/remoting/host/access_verifier.cc
@@ -35,8 +35,9 @@ bool AccessVerifier::VerifyPermissions(
const std::string& encoded_access_token) {
CHECK(initialized_);
// Check that the client has the same bare jid as the host, i.e.
- // client's full jid starts with host's bare jid.
- if (!StartsWithASCII(client_jid, host_jid_prefix_, true)) {
+ // client's full JID starts with host's bare jid. Comparison is case
+ // insensitive.
+ if (!StartsWithASCII(client_jid, host_jid_prefix_, false)) {
awong 2011/02/14 20:25:54 I'm thinking that we should preface this with an I
Sergey Ulanov 2011/02/14 21:38:20 Added IsStringASCII() verification, not sure if it
awong 2011/02/14 21:59:06 I'm not 100% sure it does... It falls down to strn
Sergey Ulanov 2011/02/14 22:05:36 Yes, you are right. Thanks for catching this!
return false;
}
« no previous file with comments | « no previous file | remoting/host/access_verifier_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698