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

Unified Diff: chrome/browser/net/chrome_network_delegate.cc

Issue 2640073003: WIP: Skip symbolic links in file:// URLs. (Closed)
Patch Set: WIP: Skip symbolic linkx in file:// URLs. Created 3 years, 11 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/directory_lister.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/net/chrome_network_delegate.cc
diff --git a/chrome/browser/net/chrome_network_delegate.cc b/chrome/browser/net/chrome_network_delegate.cc
index 3b866102845df0058f5440290464d90e86e9f2a9..235b9c07d19efa956ca489615357917bf2fe4b65 100644
--- a/chrome/browser/net/chrome_network_delegate.cc
+++ b/chrome/browser/net/chrome_network_delegate.cc
@@ -478,6 +478,9 @@ bool ChromeNetworkDelegate::OnCanAccessFile(const net::URLRequest& request,
return true;
}
+ if (base::IsLink(path.StripTrailingSeparators()))
+ return false;
+
// Use a whitelist to only allow access to files residing in the list of
// directories below.
static const char* const kLocalAccessWhiteList[] = {
« no previous file with comments | « no previous file | net/base/directory_lister.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698