Bug 1349276 - Paths received by FileSystemRequestParent need to be sanitized before passed to IsDescendantPath, r=haik

This commit is contained in:
Andrea Marchesini 2017-03-27 09:48:41 +02:00
Родитель bea755a58f
Коммит 97fbc18cea
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -89,6 +89,10 @@ FileSystemSecurity::ContentProcessHasAccessTo(ContentParentId aId,
MOZ_ASSERT(NS_IsMainThread());
AssertIsInMainProcess();
if (FindInReadable(NS_LITERAL_STRING(".."), aPath)) {
return false;
}
nsTArray<nsString>* paths;
if (!mPaths.Get(aId, &paths)) {
return false;