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

Unified Diff: chrome/common/extensions/extension_resource.cc

Issue 11308204: Fix directory traversal in extension_resources.cc. Adds test case, which is complicated by several… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 1 month 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 | chrome/common/extensions/extension_resource_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/extension_resource.cc
===================================================================
--- chrome/common/extensions/extension_resource.cc (revision 169455)
+++ chrome/common/extensions/extension_resource.cc (working copy)
@@ -67,7 +67,7 @@
i = components.begin(); i != components.end(); i++) {
if (*i == FilePath::kParentDirectory) {
depth--;
- } else {
+ } else if (*i != FilePath::kCurrentDirectory) {
depth++;
}
if (depth < 0) {
« no previous file with comments | « no previous file | chrome/common/extensions/extension_resource_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698