summaryrefslogtreecommitdiff
path: root/mozilla-1540145.patch
diff options
context:
space:
mode:
authorMartin Stransky <stransky@redhat.com>2019-04-01 09:46:45 +0200
committerMartin Stransky <stransky@redhat.com>2019-04-01 09:46:45 +0200
commita2eb082d2a5d5b077cd20f01afcd7b3ddb06f307 (patch)
tree3f2aadecb02cd89876a9d91801507978a69fb100 /mozilla-1540145.patch
parentEnabled pipewire for flatpak (diff)
downloadlibrewolf-fedora-ff-a2eb082d2a5d5b077cd20f01afcd7b3ddb06f307.tar.gz
librewolf-fedora-ff-a2eb082d2a5d5b077cd20f01afcd7b3ddb06f307.tar.bz2
librewolf-fedora-ff-a2eb082d2a5d5b077cd20f01afcd7b3ddb06f307.zip
Updated to 66.0.2 (Build 1), Added fixes for mozbz#1526243, mozbz#1540145
Diffstat (limited to 'mozilla-1540145.patch')
-rw-r--r--mozilla-1540145.patch168
1 files changed, 168 insertions, 0 deletions
diff --git a/mozilla-1540145.patch b/mozilla-1540145.patch
new file mode 100644
index 0000000..efdf89d
--- /dev/null
+++ b/mozilla-1540145.patch
@@ -0,0 +1,168 @@
+diff -up firefox-66.0.1/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp.mozilla-1540145 firefox-66.0.1/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp
+--- firefox-66.0.1/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp.mozilla-1540145 2019-03-22 06:06:07.000000000 +0100
++++ firefox-66.0.1/toolkit/system/unixproxy/nsUnixSystemProxySettings.cpp 2019-04-01 09:33:18.621166482 +0200
+@@ -6,7 +6,6 @@
+ #include "nsISystemProxySettings.h"
+ #include "mozilla/ModuleUtils.h"
+ #include "nsIServiceManager.h"
+-#include "nsIGConfService.h"
+ #include "nsIURI.h"
+ #include "nsReadableUtils.h"
+ #include "nsArrayUtils.h"
+@@ -32,16 +31,10 @@ class nsUnixSystemProxySettings final :
+ private:
+ ~nsUnixSystemProxySettings() = default;
+
+- nsCOMPtr<nsIGConfService> mGConf;
+- nsCOMPtr<nsIGSettingsService> mGSettings;
++ nsCOMPtr<nsIGSettingsService> mGSettings;
+ nsCOMPtr<nsIGSettingsCollection> mProxySettings;
+ nsInterfaceHashtable<nsCStringHashKey, nsIGSettingsCollection>
+ mSchemeProxySettings;
+- bool IsProxyMode(const char* aMode);
+- nsresult SetProxyResultFromGConf(const char* aKeyBase, const char* aType,
+- nsACString& aResult);
+- nsresult GetProxyFromGConf(const nsACString& aScheme, const nsACString& aHost,
+- int32_t aPort, nsACString& aResult);
+ nsresult GetProxyFromGSettings(const nsACString& aScheme,
+ const nsACString& aHost, int32_t aPort,
+ nsACString& aResult);
+@@ -66,20 +59,10 @@ nsresult nsUnixSystemProxySettings::Init
+ NS_LITERAL_CSTRING("org.gnome.system.proxy"),
+ getter_AddRefs(mProxySettings));
+ }
+- if (!mProxySettings) {
+- mGConf = do_GetService(NS_GCONFSERVICE_CONTRACTID);
+- }
+
+ return NS_OK;
+ }
+
+-bool nsUnixSystemProxySettings::IsProxyMode(const char* aMode) {
+- nsAutoCString mode;
+- return NS_SUCCEEDED(mGConf->GetString(
+- NS_LITERAL_CSTRING("/system/proxy/mode"), mode)) &&
+- mode.EqualsASCII(aMode);
+-}
+-
+ nsresult nsUnixSystemProxySettings::GetPACURI(nsACString& aResult) {
+ if (mProxySettings) {
+ nsCString proxyMode;
+@@ -92,14 +75,8 @@ nsresult nsUnixSystemProxySettings::GetP
+ }
+ /* The org.gnome.system.proxy schema has been found, but auto mode is not
+ * set. Don't try the GConf and return empty string. */
+- aResult.Truncate();
+- return NS_OK;
+ }
+
+- if (mGConf && IsProxyMode("auto")) {
+- return mGConf->GetString(NS_LITERAL_CSTRING("/system/proxy/autoconfig_url"),
+- aResult);
+- }
+ // Return an empty string when auto mode is not set.
+ aResult.Truncate();
+ return NS_OK;
+@@ -217,30 +194,6 @@ static nsresult GetProxyFromEnvironment(
+ return NS_OK;
+ }
+
+-nsresult nsUnixSystemProxySettings::SetProxyResultFromGConf(
+- const char* aKeyBase, const char* aType, nsACString& aResult) {
+- nsAutoCString hostKey;
+- hostKey.AppendASCII(aKeyBase);
+- hostKey.AppendLiteral("host");
+- nsAutoCString host;
+- nsresult rv = mGConf->GetString(hostKey, host);
+- NS_ENSURE_SUCCESS(rv, rv);
+- if (host.IsEmpty()) return NS_ERROR_FAILURE;
+-
+- nsAutoCString portKey;
+- portKey.AppendASCII(aKeyBase);
+- portKey.AppendLiteral("port");
+- int32_t port;
+- rv = mGConf->GetInt(portKey, &port);
+- NS_ENSURE_SUCCESS(rv, rv);
+-
+- /* When port is 0, proxy is not considered as enabled even if host is set. */
+- if (port == 0) return NS_ERROR_FAILURE;
+-
+- SetProxyResult(aType, host, port, aResult);
+- return NS_OK;
+-}
+-
+ nsresult nsUnixSystemProxySettings::SetProxyResultFromGSettings(
+ const char* aKeyBase, const char* aType, nsACString& aResult) {
+ nsDependentCString key(aKeyBase);
+@@ -366,63 +319,6 @@ static bool HostIgnoredByProxy(const nsA
+ return memcmp(&ignoreAddr, &hostAddr, sizeof(PRIPv6Addr)) == 0;
+ }
+
+-nsresult nsUnixSystemProxySettings::GetProxyFromGConf(const nsACString& aScheme,
+- const nsACString& aHost,
+- int32_t aPort,
+- nsACString& aResult) {
+- bool masterProxySwitch = false;
+- mGConf->GetBool(NS_LITERAL_CSTRING("/system/http_proxy/use_http_proxy"),
+- &masterProxySwitch);
+- // if no proxy is set in GConf return NS_ERROR_FAILURE
+- if (!(IsProxyMode("manual") || masterProxySwitch)) {
+- return NS_ERROR_FAILURE;
+- }
+-
+- nsCOMPtr<nsIArray> ignoreList;
+- if (NS_SUCCEEDED(mGConf->GetStringList(
+- NS_LITERAL_CSTRING("/system/http_proxy/ignore_hosts"),
+- getter_AddRefs(ignoreList))) &&
+- ignoreList) {
+- uint32_t len = 0;
+- ignoreList->GetLength(&len);
+- for (uint32_t i = 0; i < len; ++i) {
+- nsCOMPtr<nsISupportsString> str = do_QueryElementAt(ignoreList, i);
+- if (str) {
+- nsAutoString s;
+- if (NS_SUCCEEDED(str->GetData(s)) && !s.IsEmpty()) {
+- if (HostIgnoredByProxy(NS_ConvertUTF16toUTF8(s), aHost)) {
+- aResult.AppendLiteral("DIRECT");
+- return NS_OK;
+- }
+- }
+- }
+- }
+- }
+-
+- bool useHttpProxyForAll = false;
+- // This setting sometimes doesn't exist, don't bail on failure
+- mGConf->GetBool(NS_LITERAL_CSTRING("/system/http_proxy/use_same_proxy"),
+- &useHttpProxyForAll);
+-
+- nsresult rv;
+- if (!useHttpProxyForAll) {
+- rv = SetProxyResultFromGConf("/system/proxy/socks_", "SOCKS", aResult);
+- if (NS_SUCCEEDED(rv)) return rv;
+- }
+-
+- if (aScheme.LowerCaseEqualsLiteral("http") || useHttpProxyForAll) {
+- rv = SetProxyResultFromGConf("/system/http_proxy/", "PROXY", aResult);
+- } else if (aScheme.LowerCaseEqualsLiteral("https")) {
+- rv = SetProxyResultFromGConf("/system/proxy/secure_", "PROXY", aResult);
+- } else if (aScheme.LowerCaseEqualsLiteral("ftp")) {
+- rv = SetProxyResultFromGConf("/system/proxy/ftp_", "PROXY", aResult);
+- } else {
+- rv = NS_ERROR_FAILURE;
+- }
+-
+- return rv;
+-}
+-
+ nsresult nsUnixSystemProxySettings::GetProxyFromGSettings(
+ const nsACString& aScheme, const nsACString& aHost, int32_t aPort,
+ nsACString& aResult) {
+@@ -494,7 +390,6 @@ nsresult nsUnixSystemProxySettings::GetP
+ nsresult rv = GetProxyFromGSettings(aScheme, aHost, aPort, aResult);
+ if (NS_SUCCEEDED(rv)) return rv;
+ }
+- if (mGConf) return GetProxyFromGConf(aScheme, aHost, aPort, aResult);
+
+ return GetProxyFromEnvironment(aScheme, aHost, aPort, aResult);
+ }
bgstack15