mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-03 22:38:41 +09:00
Bug 1413868.
This commit is contained in:
parent
76e79cecec
commit
c180f85048
8 changed files with 466 additions and 0 deletions
|
|
@ -46,6 +46,7 @@
|
|||
#include "prproces.h"
|
||||
#include "prlink.h"
|
||||
|
||||
#include "mozilla/FilePreferences.h"
|
||||
#include "mozilla/Mutex.h"
|
||||
#include "SpecialSystemDirectory.h"
|
||||
|
||||
|
|
@ -1167,6 +1168,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;
|
||||
}
|
||||
|
|
@ -1979,6 +1984,10 @@ nsLocalFile::CopySingleFile(nsIFile* aSourceFile, nsIFile* aDestParent,
|
|||
}
|
||||
}
|
||||
|
||||
if (FilePreferences::IsBlockedUNCPath(destPath)) {
|
||||
return NS_ERROR_FILE_ACCESS_DENIED;
|
||||
}
|
||||
|
||||
if (!move) {
|
||||
copyOK = ::CopyFileExW(filePath.get(), destPath.get(), nullptr,
|
||||
nullptr, nullptr, dwCopyFlags);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue