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

Issue 172012: Add "bool FilePath::ReferencesParent()" which adds a clean & simple way for... (Closed)

Created:
11 years, 4 months ago by Chris Evans
Modified:
9 years, 6 months ago
CC:
chromium-reviews_googlegroups.com, brettw
Visibility:
Public.

Description

Add "bool FilePath::ReferencesParent()" which adds a clean & simple way for checking for ".." in a FilePath. Needed to make an upcoming security fix clean. BUG=NONE TEST=FilePathTest.ReferencesParent Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=23528

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 2

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+50 lines, -1 line) Patch
M base/file_path.h View 1 chunk +4 lines, -0 lines 0 comments Download
M base/file_path.cc View 1 2 1 chunk +14 lines, -0 lines 0 comments Download
M base/file_path_unittest.cc View 1 2 chunks +32 lines, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
Chris Evans
11 years, 4 months ago (2009-08-15 00:35:58 UTC) #1
Erik does not do reviews
otherwise LGTM http://codereview.chromium.org/172012/diff/1007/6 File base/file_path.cc (right): http://codereview.chromium.org/172012/diff/1007/6#newcode463 Line 463: if (component.length() == 2 && component[0] ...
11 years, 4 months ago (2009-08-15 13:25:11 UTC) #2
Chris Evans
11 years, 4 months ago (2009-08-15 21:35:25 UTC) #3
Thanks! Submitting.

http://codereview.chromium.org/172012/diff/1007/6
File base/file_path.cc (right):

http://codereview.chromium.org/172012/diff/1007/6#newcode463
Line 463: if (component.length() == 2 && component[0] == '.' && component[1] ==
'.')
On 2009/08/15 13:25:11, Erik Kay wrote:
> you should just compare against kParentDirectory here

Done.

Powered by Google App Engine
This is Rietveld 408576698