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

Unified Diff: net/base/net_util.h

Issue 23464037: Net: make IsSafePortableRelativePath look for reserved names on all components. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 | net/base/net_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/base/net_util.h
diff --git a/net/base/net_util.h b/net/base/net_util.h
index ecd7400cfa16e516a1d986ea76a807db5faa07a5..f241f4fd42339fd733e68aaeb2901ef20725ce07 100644
--- a/net/base/net_util.h
+++ b/net/base/net_util.h
@@ -298,10 +298,9 @@ NET_EXPORT base::FilePath GenerateFileName(
const std::string& mime_type,
const std::string& default_name);
-// Valid basenames:
+// Valid components:
// * are not empty
// * are not Windows reserved names (CON, NUL.zip, etc.)
-// * are just basenames
// * do not have trailing separators
// * do not equal kCurrentDirectory
// * do not reference the parent directory
@@ -311,7 +310,7 @@ NET_EXPORT base::FilePath GenerateFileName(
// - * do not end with Windows shell-integrated extensions (even on posix)
// - * do not begin with '.' (which would hide them in most file managers)
// - * do not end with ' ' or '.'
-NET_EXPORT bool IsSafePortableBasename(const base::FilePath& path);
+NET_EXPORT bool IsSafePortablePathComponent(const base::FilePath& component);
// Basenames of valid relative paths are IsSafePortableBasename(), and internal
// path components of valid relative paths are valid path components as
« no previous file with comments | « no previous file | net/base/net_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698