[tbb-commits] [Git][tpo/applications/tor-browser][tor-browser-102.12.0esr-13.0-1] fixup! Bug 40925: Implemented the Security Level component
Pier Angelo Vendrame (@pierov)
git at gitlab.torproject.org
Fri Jun 9 10:00:09 UTC 2023
Pier Angelo Vendrame pushed to branch tor-browser-102.12.0esr-13.0-1 at The Tor Project / Applications / Tor Browser
Commits:
5db35e85 by cypherpunks1 at 2023-06-08T23:51:40-08:00
fixup! Bug 40925: Implemented the Security Level component
Bug 26277: Skip the redirection page when searching with DuckDuckGo on the safest security level
- - - - -
1 changed file:
- toolkit/components/search/SearchEngine.jsm
Changes:
=====================================
toolkit/components/search/SearchEngine.jsm
=====================================
@@ -30,6 +30,12 @@ XPCOMUtils.defineLazyGetter(this, "logConsole", () => {
});
});
+XPCOMUtils.defineLazyScriptGetter(
+ this,
+ "SecurityLevelPrefs",
+ "chrome://browser/content/securitylevel/securityLevel.js"
+);
+
const USER_DEFINED = "searchTerms";
// Supported OpenSearch parameters
@@ -429,7 +435,17 @@ class EngineURL {
}
getSubmission(searchTerms, engine, purpose) {
- var url = ParamSubstitution(this.template, searchTerms, engine);
+ let urlTemplate = this.template;
+ if (
+ engine &&
+ (engine._extensionID === "ddg at search.mozilla.org" ||
+ engine._extensionID === "ddg-onion at search.mozilla.org") &&
+ this.type === SearchUtils.URL_TYPE.SEARCH &&
+ SecurityLevelPrefs?.securityLevel === "safest"
+ ) {
+ urlTemplate += "html";
+ }
+ var url = ParamSubstitution(urlTemplate, searchTerms, engine);
// Default to searchbar if the purpose is not provided
var requestPurpose = purpose || "searchbar";
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/5db35e8593325ac9a680e1013e6c7a825e8ede0b
--
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser/-/commit/5db35e8593325ac9a680e1013e6c7a825e8ede0b
You're receiving this email because of your account on gitlab.torproject.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tbb-commits/attachments/20230609/933bd886/attachment-0001.htm>
More information about the tbb-commits
mailing list