From fdc6f820ca5e4b2832a0208e2a183fb1d6f8b45f Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Sat, 30 Jun 2018 18:34:19 +0200 Subject: Bug 1413868. --- xpcom/io/nsLocalFileWin.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'xpcom/io/nsLocalFileWin.cpp') diff --git a/xpcom/io/nsLocalFileWin.cpp b/xpcom/io/nsLocalFileWin.cpp index 66e267807..5a72c750c 100644 --- a/xpcom/io/nsLocalFileWin.cpp +++ b/xpcom/io/nsLocalFileWin.cpp @@ -45,6 +45,7 @@ #include "prproces.h" #include "prlink.h" +#include "mozilla/FilePreferences.h" #include "mozilla/Mutex.h" #include "SpecialSystemDirectory.h" @@ -1166,6 +1167,10 @@ nsLocalFile::InitWithPath(const nsAString& aFilePath) return NS_ERROR_FILE_UNRECOGNIZED_PATH; } + if (FilePreferences::IsBlockedUNCPath(aFilePath)) { + return NS_ERROR_FILE_ACCESS_DENIED; + } + if (secondChar != L':' && (secondChar != L'\\' || firstChar != L'\\')) { return NS_ERROR_FILE_UNRECOGNIZED_PATH; } @@ -1976,6 +1981,10 @@ nsLocalFile::CopySingleFile(nsIFile* aSourceFile, nsIFile* aDestParent, dwCopyFlags |= COPY_FILE_NO_BUFFERING; } + if (FilePreferences::IsBlockedUNCPath(destPath)) { + return NS_ERROR_FILE_ACCESS_DENIED; + } + if (!move) { copyOK = ::CopyFileExW(filePath.get(), destPath.get(), nullptr, nullptr, nullptr, dwCopyFlags); -- cgit v1.2.3 From 67d4d2fe185849e8c19c2045ad83e1d528d44cec Mon Sep 17 00:00:00 2001 From: Paolo Amadini Date: Mon, 18 Jun 2018 11:26:33 +0100 Subject: Bug 1468217 - Add "SettingContent-ms" to the list of executable file extensions. r=Gijs, a=RyanVM --- xpcom/io/nsLocalFileWin.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'xpcom/io/nsLocalFileWin.cpp') diff --git a/xpcom/io/nsLocalFileWin.cpp b/xpcom/io/nsLocalFileWin.cpp index 5a72c750c..e73e15950 100644 --- a/xpcom/io/nsLocalFileWin.cpp +++ b/xpcom/io/nsLocalFileWin.cpp @@ -3071,6 +3071,7 @@ nsLocalFile::IsExecutable(bool* aResult) "scf", // Windows explorer command "scr", "sct", + "settingcontent-ms", "shb", "shs", "url", -- cgit v1.2.3