1
0
mirror of https://github.com/roytam1/UXP.git synced 2026-05-29 16:58:28 +00:00

[AppCache] Add check for disallowed encoded path separators

This commit is contained in:
Moonchild
2020-07-09 13:01:36 +00:00
committed by Roy Tam
parent 6cf5f024c4
commit 6aaea9dde6
@@ -948,6 +948,14 @@ nsOfflineManifestItem::HandleManifestLine(const nsCString::const_iterator &aBegi
mStrictFileOriginPolicy))
break;
// Check fallback path for disallowed encoded path separators
nsAutoCString path;
fallbackURI->GetFilePath(path);
if (path.Find("%2f") != kNotFound || path.Find("%2F") != kNotFound) {
LogToConsole("Offline cache manifest bad fallback path", this);
break;
}
mFallbackURIs.AppendObject(fallbackURI);
AddNamespace(nsIApplicationCacheNamespace::NAMESPACE_FALLBACK,