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

Unified Diff: chrome/browser/component_updater/supervised_user_whitelist_installer.cc

Issue 1770313004: Not saving whitelist icon paths that reference the parent. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/component_updater/supervised_user_whitelist_installer.cc
diff --git a/chrome/browser/component_updater/supervised_user_whitelist_installer.cc b/chrome/browser/component_updater/supervised_user_whitelist_installer.cc
index 7989e954670c5299bc7360235a9be67af803ac1e..83891e582d7dda733714114295811aa9a145deae 100644
--- a/chrome/browser/component_updater/supervised_user_whitelist_installer.cc
+++ b/chrome/browser/component_updater/supervised_user_whitelist_installer.cc
@@ -78,6 +78,9 @@ base::FilePath GetLargeIconPath(const base::DictionaryValue& manifest,
return base::FilePath();
if (!base::GetValueAsFilePath(*path_value, &path))
return base::FilePath();
+ // Path components ("..") are not allowed.
+ if (path.ReferencesParent())
+ return base::FilePath();
Marc Treib 2016/03/09 14:50:53 Probably the same should apply below for the raw w
atanasova 2016/03/10 10:35:28 Done.
Bernhard Bauer 2016/03/15 09:34:52 (The raw whitelists are read with ReadFileToString
return install_dir.Append(path);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698