Skip to content

Commit

Permalink
Merge branch 'jb51824' into 'master'
Browse files Browse the repository at this point in the history
[sailfishos][gecko] Apply UA override for window.navigator. Fixes JB#51824

See merge request mer-core/gecko-dev!180
  • Loading branch information
rainemak committed Nov 3, 2020
2 parents ca74c54 + 0976781 commit e1cf83b
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
@@ -0,0 +1,32 @@
From 84c0d5ff96ec89ce5b5a4b9aa56a6d89b65df781 Mon Sep 17 00:00:00 2001
From: Raine Makelainen <raine.makelainen@jolla.com>
Date: Tue, 3 Nov 2020 09:49:46 +0200
Subject: [PATCH] [sailfishos][gecko] Apply UA override for window.navigator.
Fixes JB#51824

Do not return just the "general.useragent.override" rather let the
http protocol handler to resolve possible override.

To be noted that with this change "privacy.resistFingerprinting"
will keep working if used.

Signed-off-by: Raine Makelainen <raine.makelainen@jolla.com>
---
dom/base/Navigator.cpp | 1 -
1 file changed, 1 deletion(-)

diff --git a/dom/base/Navigator.cpp b/dom/base/Navigator.cpp
index 1e1398e5ee73..b70cd008abf6 100644
--- a/dom/base/Navigator.cpp
+++ b/dom/base/Navigator.cpp
@@ -1599,7 +1599,6 @@ nsresult Navigator::GetUserAgent(nsPIDOMWindowInner* aWindow,

if (NS_SUCCEEDED(rv)) {
aUserAgent = override;
- return NS_OK;
}
}

--
2.28.0

1 change: 1 addition & 0 deletions rpm/xulrunner-qt5.spec
Expand Up @@ -86,6 +86,7 @@ Patch40: 0040-sailfishos-configuration-Configure-application-as-mo.patch
Patch41: 0041-sailfishos-gecko-Include-XUL-videocontrols-reflow-co.patch
Patch42: 0042-sailfishos-gecko-Adjust-audio-control-dimensions.-Co.patch
Patch43: 0043-sailfishos-gecko-Prioritize-loading-of-extension-ver.patch
Patch44: 0044-sailfishos-gecko-Apply-UA-override-for-window.naviga.patch

BuildRequires: rust
BuildRequires: rust-std-static
Expand Down

0 comments on commit e1cf83b

Please sign in to comment.