зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1403870: Allow toplevel data URI navigation data:application/json. r=smaug
This commit is contained in:
Родитель
6fbe557b4c
Коммит
078474c979
|
@ -63,8 +63,9 @@ nsContentSecurityManager::AllowTopLevelNavigationToDataURI(nsIChannel* aChannel)
|
|||
!StringBeginsWith(filePath, NS_LITERAL_CSTRING("image/svg+xml"))) {
|
||||
return true;
|
||||
}
|
||||
// Whitelist data: PDFs
|
||||
if (StringBeginsWith(filePath, NS_LITERAL_CSTRING("application/pdf"))) {
|
||||
// Whitelist data: PDFs and JSON
|
||||
if (StringBeginsWith(filePath, NS_LITERAL_CSTRING("application/pdf")) ||
|
||||
StringBeginsWith(filePath, NS_LITERAL_CSTRING("application/json"))) {
|
||||
return true;
|
||||
}
|
||||
// Redirecting to a toplevel data: URI is not allowed, hence we make
|
||||
|
|
Загрузка…
Ссылка в новой задаче