From ae14556114dcae29f679db7c15f0bc9b707bb89a Mon Sep 17 00:00:00 2001 From: janekptacijarabaci Date: Sun, 15 Apr 2018 07:29:18 +0200 Subject: moebius#130: URL parser - fix: don't allow empty host name https://github.com/MoonchildProductions/moebius/issues/130 --- toolkit/components/passwordmgr/test/unit/test_logins_search.js | 1 - toolkit/components/places/UnifiedComplete.js | 2 +- toolkit/components/places/nsNavHistory.cpp | 4 ++++ 3 files changed, 5 insertions(+), 2 deletions(-) (limited to 'toolkit') diff --git a/toolkit/components/passwordmgr/test/unit/test_logins_search.js b/toolkit/components/passwordmgr/test/unit/test_logins_search.js index 188c75039..730771981 100644 --- a/toolkit/components/passwordmgr/test/unit/test_logins_search.js +++ b/toolkit/components/passwordmgr/test/unit/test_logins_search.js @@ -192,7 +192,6 @@ add_task(function test_search_all_full_case_sensitive() { checkAllSearches({ hostname: "http://www.example.com" }, 1); checkAllSearches({ hostname: "http://www.example.com/" }, 0); - checkAllSearches({ hostname: "http://" }, 0); checkAllSearches({ hostname: "example.com" }, 0); checkAllSearches({ formSubmitURL: "http://www.example.com" }, 2); diff --git a/toolkit/components/places/UnifiedComplete.js b/toolkit/components/places/UnifiedComplete.js index ad3d35aab..acd358b11 100644 --- a/toolkit/components/places/UnifiedComplete.js +++ b/toolkit/components/places/UnifiedComplete.js @@ -1245,7 +1245,7 @@ Search.prototype = { // * If the protocol differs we should not match. For example if the user // searched https we should not return http. try { - let prefixURI = NetUtil.newURI(this._strippedPrefix); + let prefixURI = NetUtil.newURI(this._strippedPrefix + match.token); let finalURI = NetUtil.newURI(match.url); if (prefixURI.scheme != finalURI.scheme) return false; diff --git a/toolkit/components/places/nsNavHistory.cpp b/toolkit/components/places/nsNavHistory.cpp index 8cf3a2e32..7f4007c1a 100644 --- a/toolkit/components/places/nsNavHistory.cpp +++ b/toolkit/components/places/nsNavHistory.cpp @@ -949,6 +949,10 @@ nsresult // static nsNavHistory::AsciiHostNameFromHostString(const nsACString& aHostName, nsACString& aAscii) { + aAscii.Truncate(); + if (aHostName.IsEmpty()) { + return NS_OK; + } // To properly generate a uri we must provide a protocol. nsAutoCString fakeURL("http://"); fakeURL.Append(aHostName); -- cgit v1.2.3 From d31fa89c8aa7f676844e91dbd0bbd162ce12904a Mon Sep 17 00:00:00 2001 From: adeshkp Date: Sun, 15 Apr 2018 19:28:43 +0000 Subject: [Tycho AM] Remove test for experiments framework --- toolkit/mozapps/extensions/test/browser/browser-common.ini | 2 -- 1 file changed, 2 deletions(-) (limited to 'toolkit') diff --git a/toolkit/mozapps/extensions/test/browser/browser-common.ini b/toolkit/mozapps/extensions/test/browser/browser-common.ini index eaab29f75..3e88833ef 100644 --- a/toolkit/mozapps/extensions/test/browser/browser-common.ini +++ b/toolkit/mozapps/extensions/test/browser/browser-common.ini @@ -39,8 +39,6 @@ skip-if = true # Bug 1093190 - Disabled due to leak [browser_discovery.js] skip-if = e10s # Bug ?????? - test times out on try on all platforms, but works locally for markh! [browser_dragdrop.js] -skip-if = buildapp == 'mulet' -[browser_experiments.js] skip-if = e10s [browser_list.js] [browser_metadataTimeout.js] -- cgit v1.2.3 From 3983e0541eb2426b47cebf8e2afd9d7f3b2afffe Mon Sep 17 00:00:00 2001 From: adeshkp Date: Sun, 15 Apr 2018 19:33:04 +0000 Subject: [WebEx AM] Remove test for experiments framework --- toolkit/mozapps/webextensions/test/browser/browser-common.ini | 1 - 1 file changed, 1 deletion(-) (limited to 'toolkit') diff --git a/toolkit/mozapps/webextensions/test/browser/browser-common.ini b/toolkit/mozapps/webextensions/test/browser/browser-common.ini index eda266e2f..83920465b 100644 --- a/toolkit/mozapps/webextensions/test/browser/browser-common.ini +++ b/toolkit/mozapps/webextensions/test/browser/browser-common.ini @@ -34,7 +34,6 @@ skip-if = true # Bug 1093190 - Disabled due to leak [browser_discovery.js] [browser_dragdrop.js] skip-if = buildapp == 'mulet' -[browser_experiments.js] [browser_list.js] [browser_metadataTimeout.js] [browser_searching.js] -- cgit v1.2.3