commit b18c9e27e744f4b0baadb5ea0aa4f740c4334238
parent 1f5159b8a86c99264df78993bba5c931949f0880
Author: Duncan McIntosh <dmcintosh@mozilla.com>
Date: Tue, 18 Nov 2025 19:36:27 +0000
Bug 2000708 - Do not include the scheme or hostname in the path used to download the stub installer. r=cdupuis
Differential Revision: https://phabricator.services.mozilla.com/D272948
Diffstat:
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/browser/app/desktop-launcher/download_firefox.cpp b/browser/app/desktop-launcher/download_firefox.cpp
@@ -86,8 +86,7 @@ std::optional<std::wstring> get_object_name() {
static_assert(false);
#endif
- return L"https://download.mozilla.org/?os=" + arch.value() + L"&lang=" +
- lang + L"&product=" + product;
+ return L"?os=" + arch.value() + L"&lang=" + lang + L"&product=" + product;
}
/**
diff --git a/browser/app/desktop-launcher/tests/gtest/DesktopLauncherTest.cpp b/browser/app/desktop-launcher/tests/gtest/DesktopLauncherTest.cpp
@@ -96,7 +96,8 @@ TEST_F(DesktopLauncherTest, TempFileNameTest) {
TEST_F(DesktopLauncherTest, TestGetObjectName) {
std::optional<std::wstring> objectName = get_object_name();
ASSERT_TRUE(objectName.has_value());
- ASSERT_NE(std::wstring::npos,
+ // The object name is a path, not a URL.
+ ASSERT_EQ(std::wstring::npos,
objectName.value().find(L"https://download.mozilla.org/"));
ASSERT_NE(std::wstring::npos, objectName.value().find(L"lang="));
ASSERT_NE(std::wstring::npos, objectName.value().find(L"product="));