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

Unified Diff: content/browser/child_process_security_policy_impl.cc

Issue 11734030: Small extra validations on permission checks: reject "0" as a valid permission (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 12 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 | « content/browser/OWNERS ('k') | content/browser/child_process_security_policy_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/child_process_security_policy_impl.cc
===================================================================
--- content/browser/child_process_security_policy_impl.cc (revision 174890)
+++ content/browser/child_process_security_policy_impl.cc (working copy)
@@ -146,6 +146,8 @@
// Determine if the certain permissions have been granted to a file.
bool HasPermissionsForFile(const FilePath& file, int permissions) {
+ if (!permissions || file.empty() || !file.IsAbsolute())
+ return false;
FilePath current_path = file.StripTrailingSeparators();
FilePath last_path;
int skip = 0;
« no previous file with comments | « content/browser/OWNERS ('k') | content/browser/child_process_security_policy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698