- Firefox 130.0.1 Release * Enterprise: Added an enterprise policy to disable the *Firefox Labs* section in *Settings*. (bmo#1911826) * Fixed a recent regression causing some UI elements to be rendered as left-to-right instead of right-to-left for users of our Saraiki localization. (bmo#1917175) * Linux: Fixed black rendering of AVIF images when Firefox is built with GCC. (bmo#1916038) - removed obsolete patches mozilla-bmo1916038.patch - Mozilla Firefox 130.0 MFSA 2024-39 (bsc#1229821) * CVE-2024-8385 (bmo#1911909) WASM type confusion involving ArrayTypes * CVE-2024-8381 (bmo#1912715) Type confusion when looking up a property name in a "with" block * CVE-2024-8388 (bmo#1902996, bmo#1839074, bmo#1865413, bmo#1868970, bmo#1873367, bmo#1877820, bmo#1884642, bmo#1886469, bmo#1894326, bmo#1894891, bmo#1897648) Fullscreen notice on Android could be hidden under various panels and OS prompts * CVE-2024-8382 (bmo#1906744) Internal event interfaces were exposed to web content when browser EventHandler listener callbacks ran * CVE-2024-8383 (bmo#1908496) Firefox did not ask before openings news: links in an external application * CVE-2024-8384 (bmo#1911288) OBS-URL: https://build.opensuse.org/package/show/mozilla:Factory/MozillaFirefox?expand=0&rev=1174
64 lines
2.5 KiB
Diff
64 lines
2.5 KiB
Diff
# HG changeset patch
|
|
# User Rob Krum <biggestsonicfan@gmail.com>
|
|
# Date 1695432215 25200
|
|
# Fri Sep 22 18:23:35 2023 -0700
|
|
# Node ID e6a8a9f0956d124e8de34eb4bcf09d8e17077d9d
|
|
# Parent 5dbbabbfaca21d2c5994f95ed095313284611c44
|
|
Bug 1822730 - Add basic blob protocol handling for blob URIs that contain parsable http/s protocols
|
|
|
|
diff --git a/toolkit/mozapps/downloads/DownloadLastDir.sys.mjs b/toolkit/mozapps/downloads/DownloadLastDir.sys.mjs
|
|
--- a/toolkit/mozapps/downloads/DownloadLastDir.sys.mjs
|
|
+++ b/toolkit/mozapps/downloads/DownloadLastDir.sys.mjs
|
|
@@ -216,38 +216,49 @@ export class DownloadLastDir {
|
|
Services.prefs.setComplexValue(LAST_DIR_PREF, nsIFile, aFile);
|
|
} else if (Services.prefs.prefHasUserValue(LAST_DIR_PREF)) {
|
|
Services.prefs.clearUserPref(LAST_DIR_PREF);
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Pre-processor to extract a domain name to be used with the content-prefs
|
|
- * service. This specially handles data and file URIs so that the download
|
|
- * dirs are recalled in a more consistent way:
|
|
+ * service. This specially handles data, file and blob URIs so that the
|
|
+ * download dirs are recalled in a more consistent way:
|
|
* - all file:/// URIs share the same folder
|
|
* - data: URIs share a folder per mime-type. If a mime-type is not
|
|
* specified text/plain is assumed.
|
|
* - blob: URIs share the same folder as their origin. This is done by
|
|
* ContentPrefs already, so we just let the url fall-through.
|
|
* In any other case the original URL is returned as a string and ContentPrefs
|
|
* will do its usual parsing.
|
|
*
|
|
* @param {string|nsIURI|URL} url The URL to parse
|
|
* @returns {string} the domain name to use, or the original url.
|
|
*/
|
|
#cpsGroupFromURL(url) {
|
|
if (typeof url == "string") {
|
|
+ if (url.startsWith("blob:http://") || url.startsWith("blob:https://")) {
|
|
+ url = url.replace("blob:", "");
|
|
+ }
|
|
url = new URL(url);
|
|
} else if (url instanceof Ci.nsIURI) {
|
|
url = URL.fromURI(url);
|
|
}
|
|
if (!URL.isInstance(url)) {
|
|
return url;
|
|
}
|
|
+ if (url.protocol == "blob:") {
|
|
+ if (
|
|
+ url.href.startsWith("blob:http://") ||
|
|
+ url.href.startsWith("blob:https://")
|
|
+ ) {
|
|
+ return url.href.replace("blob:", "");
|
|
+ }
|
|
+ }
|
|
if (url.protocol == "data:") {
|
|
return url.href.match(/^data:[^;,]*/i)[0].replace(/:$/, ":text/plain");
|
|
}
|
|
if (url.protocol == "file:") {
|
|
return "file:///";
|
|
}
|
|
return url.href;
|
|
}
|