1
Fork 0
mirror of https://https.git.savannah.gnu.org/git/guix.git/ synced 2025-07-12 18:10:47 +02:00
guix/gnu/packages/patches/librewolf-use-system-wide-dir.patch
Ian Eure 5cefe19700
gnu: librewolf: Update to 140.0.2-1 [security-fixes].
Contains fixes for:
CVE-2025-6424: Use-after-free in FontFaceSet
CVE-2025-6425: The WebCompat WebExtension shipped with Firefox exposed
               a persistent UUID
CVE-2025-6426: No warning when opening executable terminal files on
               macOS
CVE-2025-6427: connect-src Content Security Policy restriction could
               be bypassed
CVE-2025-6428: Firefox for Android opened URLs specified in a link
               querystring parameter
CVE-2025-6429: Incorrect parsing of URLs could have allowed embedding
               of youtube.com
CVE-2025-6430: Content-Disposition header ignored when a file is
               included in an embed or object tag
CVE-2025-6431: The prompt in Firefox for Android that asks before
               opening a link in an external application could be
               bypassed
CVE-2025-6432: DNS Requests leaked outside of a configured SOCKS proxy
CVE-2025-6433: WebAuthn would allow a user to sign a challenge on a
               webpage with an invalid TLS certificate
CVE-2025-6434: HTTPS-Only exception screen lacked anti-clickjacking
               delay
CVE-2025-6435: Save as in Devtools could download files without
               sanitizing the extension
CVE-2025-6436: Memory safety bugs fixed in Firefox 140 and Thunderbird
               140

* gnu/packages/librewolf.scm (librewolf): Update to 140.0.2-1.
* gnu/packages/patches/librewolf-use-system-wide-dir.patch: Adjust.

Change-Id: I786706575e04f32054f6a1142d606eb3ba6b22e3
2025-06-29 20:40:10 -07:00

37 lines
No EOL
1.3 KiB
Diff

Replace "/usr/lib/librewolf" (the system-wide directory for extensions and
native manifests) with "$ICECAT_SYSTEM_DIR".
diff --git a/toolkit/xre/nsXREDirProvider.cpp b/toolkit/xre/nsXREDirProvider.cpp
index 0cbc825738..5c0bf6ae7f 100644
--- a/toolkit/xre/nsXREDirProvider.cpp
+++ b/toolkit/xre/nsXREDirProvider.cpp
@@ -282,25 +282,10 @@
nsCString aName = "LibreWolf"_ns) {
nsresult rv;
nsCOMPtr<nsIFile> localDir;
-# if defined(XP_MACOSX)
- rv = GetOSXFolderType(kOnSystemDisk, kApplicationSupportFolderType,
- getter_AddRefs(localDir));
- if (NS_SUCCEEDED(rv)) {
- rv = localDir->AppendNative(aName);
- }
-# else
- ToLowerCase(aName);
- nsCString dirname =
-# ifdef HAVE_USR_LIB64_DIR
- "/usr/lib64/"_ns + aName
-# elif defined(__OpenBSD__) || defined(__FreeBSD__)
- "/usr/local/lib/"_ns + aName
-# else
- "/usr/lib/"_ns + aName
-# endif
- ;
- rv = NS_NewNativeLocalFile(dirname, getter_AddRefs(localDir));
-# endif
+ const char* systemParentDir = getenv("ICECAT_SYSTEM_DIR");
+ if (!systemParentDir || !*systemParentDir) return NS_ERROR_FAILURE;
+ rv = NS_NewNativeLocalFile(nsDependentCString(systemParentDir),
+ getter_AddRefs(localDir));
if (NS_SUCCEEDED(rv)) {
localDir.forget(aFile);