icecat: add release icecat-140.10.1-1gnu1 for ecne
This commit is contained in:
parent
a5f93cb214
commit
ff85d7c623
1256 changed files with 63469 additions and 24141 deletions
|
|
@ -80,22 +80,24 @@ bool FileSystemSecurity::ContentProcessHasAccessTo(ContentParentId aId,
|
|||
|
||||
#if defined(XP_WIN)
|
||||
if (StringBeginsWith(aPath, u"..\\"_ns) ||
|
||||
FindInReadable(u"\\..\\"_ns, aPath)) {
|
||||
return false;
|
||||
}
|
||||
#elif defined(XP_UNIX)
|
||||
if (StringBeginsWith(aPath, u"../"_ns) || FindInReadable(u"/../"_ns, aPath)) {
|
||||
FindInReadable(u"\\..\\"_ns, aPath) ||
|
||||
StringEndsWith(aPath, u"\\.."_ns)) {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
if (StringBeginsWith(aPath, u"../"_ns) || FindInReadable(u"/../"_ns, aPath) ||
|
||||
StringEndsWith(aPath, u"/.."_ns) || aPath.EqualsLiteral("..")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
nsTArray<nsString>* paths;
|
||||
if (!mPaths.Get(aId, &paths)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (uint32_t i = 0, len = paths->Length(); i < len; ++i) {
|
||||
if (FileSystemUtils::IsDescendantPath(paths->ElementAt(i), aPath)) {
|
||||
MOZ_DIAGNOSTIC_ASSERT(paths);
|
||||
for (const auto& authorizedRoot : *paths) {
|
||||
if (FileSystemUtils::IsDescendantPath(authorizedRoot, aPath)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue