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

Issue 6518012: Use case-insensitive comparison when comparing JIDs. (Closed)

Created:
9 years, 10 months ago by Sergey Ulanov
Modified:
9 years, 7 months ago
Reviewers:
awong
CC:
chromium-reviews, jamiewalch+watch_chromium.org, hclam+watch_chromium.org, simonmorris+watch_chromium.org, wez+watch_chromium.org, dmaclach+watch_chromium.org, garykac+watch_chromium.org, lambroslambrou+watch_chromium.org, ajwong+watch_chromium.org, sergeyu+watch_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Use case-insensitive comparison when comparing JIDs. BUG=None TEST=None Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=74866

Patch Set 1 #

Patch Set 2 : added test #

Total comments: 4

Patch Set 3 : addressed comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+15 lines, -2 lines) Patch
M remoting/host/access_verifier.cc View 1 2 1 chunk +11 lines, -2 lines 0 comments Download
M remoting/host/access_verifier_unittest.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Sergey Ulanov
9 years, 10 months ago (2011-02-14 20:05:19 UTC) #1
awong
http://codereview.chromium.org/6518012/diff/3001/remoting/host/access_verifier.cc File remoting/host/access_verifier.cc (right): http://codereview.chromium.org/6518012/diff/3001/remoting/host/access_verifier.cc#newcode40 remoting/host/access_verifier.cc:40: if (!StartsWithASCII(client_jid, host_jid_prefix_, false)) { I'm thinking that we ...
9 years, 10 months ago (2011-02-14 20:25:54 UTC) #2
Sergey Ulanov
http://codereview.chromium.org/6518012/diff/3001/remoting/host/access_verifier.cc File remoting/host/access_verifier.cc (right): http://codereview.chromium.org/6518012/diff/3001/remoting/host/access_verifier.cc#newcode40 remoting/host/access_verifier.cc:40: if (!StartsWithASCII(client_jid, host_jid_prefix_, false)) { On 2011/02/14 20:25:54, awong ...
9 years, 10 months ago (2011-02-14 21:38:20 UTC) #3
awong
LGTM http://codereview.chromium.org/6518012/diff/3001/remoting/host/access_verifier.cc File remoting/host/access_verifier.cc (right): http://codereview.chromium.org/6518012/diff/3001/remoting/host/access_verifier.cc#newcode40 remoting/host/access_verifier.cc:40: if (!StartsWithASCII(client_jid, host_jid_prefix_, false)) { On 2011/02/14 21:38:20, ...
9 years, 10 months ago (2011-02-14 21:59:05 UTC) #4
Sergey Ulanov
9 years, 10 months ago (2011-02-14 22:05:36 UTC) #5
http://codereview.chromium.org/6518012/diff/3001/remoting/host/access_verifie...
File remoting/host/access_verifier.cc (right):

http://codereview.chromium.org/6518012/diff/3001/remoting/host/access_verifie...
remoting/host/access_verifier.cc:40: if (!StartsWithASCII(client_jid,
host_jid_prefix_, false)) {
On 2011/02/14 21:59:06, awong wrote:
> On 2011/02/14 21:38:20, sergeyu wrote:
> > On 2011/02/14 20:25:54, awong wrote:
> > > I'm thinking that we should preface this with an IsStringASCII check.
> > > 
> > > Reading through the jingle docs, it seems like they might not always be
> ascii
> > if
> > > we're outside of the google talk network (eg., federated XMPP user).
> > Added IsStringASCII() verification, not sure if it matters though:
> > StartsWithASCII() should ignore case only for ASCII characters.
> 
> I'm not 100% sure it does... It falls down to strncasecmp which I would expect
> understands locale and can do all sorts of fun things.
Yes, you are right. Thanks for catching this!

Powered by Google App Engine
This is Rietveld 408576698