diff options
| author | rkc@chromium.org <rkc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-31 23:10:06 +0000 |
|---|---|---|
| committer | rkc@chromium.org <rkc@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-31 23:10:06 +0000 |
| commit | cd78ad53a576b3a3c10202512a1c5b7153bc6586 (patch) | |
| tree | ecfa0f4abb040c16d2aeb1cd07c694e11e86e25c /base/file_util_win.cc | |
| parent | 7cd17d8dec5f9d2fc77ce4686dbd2efdfc6cccc1 (diff) | |
| download | chromium_src-cd78ad53a576b3a3c10202512a1c5b7153bc6586.zip chromium_src-cd78ad53a576b3a3c10202512a1c5b7153bc6586.tar.gz chromium_src-cd78ad53a576b3a3c10202512a1c5b7153bc6586.tar.bz2 | |
Disallow links from being seen by the extensions via the fileapi.
This change is more of a hack at the moment, ideally we need to refactor file_util (and maybe a bit of file_path) to provide better ways to handle symlinks.
This fix prevents exploits reading arbitary files either through handled extension calls or our component extension.
BUG=chromium-os:15826
TEST=Verified that links do not show up when reading a directory in the file browser UI. Tests that specifically check for this will follow in subsequent checkins.
Review URL: http://codereview.chromium.org/7085005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87389 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_util_win.cc')
| -rw-r--r-- | base/file_util_win.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/base/file_util_win.cc b/base/file_util_win.cc index 3689614..93bfe1d 100644 --- a/base/file_util_win.cc +++ b/base/file_util_win.cc @@ -702,6 +702,12 @@ bool CreateDirectory(const FilePath& full_path) { } } +// TODO(rkc): Work out if we want to handle NTFS junctions here or not, handle +// them if we do decide to. +bool IsLink(const FilePath& file_path) { + return false; +} + bool GetFileInfo(const FilePath& file_path, base::PlatformFileInfo* results) { base::ThreadRestrictions::AssertIOAllowed(); |
