mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-28 04:39:07 -10:00
Bug 1441345 - Force the use of the Linux phishing list on Android. r=dimi
Reviewers: dimi Reviewed By: dimi Subscribers: dveditz, francois, dimi Bug #: 1441345 Differential Revision: https://phabricator.services.mozilla.com/D5479
This commit is contained in:
1 parent
391f9823e1
commit
225086a87e
1 file changed
+20
-2
@@ -113,7 +113,15 @@ InitListUpdateRequest(ThreatType aThreatType,
|
||||
ListUpdateRequest* aListUpdateRequest)
|
||||
{
|
||||
aListUpdateRequest->set_threat_type(aThreatType);
|
||||
aListUpdateRequest->set_platform_type(GetPlatformType());
|
||||
PlatformType platform = GetPlatformType();
|
||||
#if defined(ANDROID)
|
||||
// Temporary hack to fix bug 1441345.
|
||||
if ((aThreatType == SOCIAL_ENGINEERING_PUBLIC) ||
|
||||
(aThreatType == SOCIAL_ENGINEERING)) {
|
||||
platform = LINUX_PLATFORM;
|
||||
}
|
||||
#endif
|
||||
aListUpdateRequest->set_platform_type(platform);
|
||||
aListUpdateRequest->set_threat_entry_type(URL);
|
||||
|
||||
Constraints* contraints = new Constraints();
|
||||
@@ -419,6 +427,8 @@ nsUrlClassifierUtils::MakeFindFullHashRequestV4(const char** aListNames,
|
||||
// Set up FindFullHashesRequest.threat_info.
|
||||
auto threatInfo = r.mutable_threat_info();
|
||||
|
||||
PlatformType platform = GetPlatformType();
|
||||
|
||||
// 1) Set threat types.
|
||||
for (uint32_t i = 0; i < aListCount; i++) {
|
||||
// Add threat types.
|
||||
@@ -434,6 +444,14 @@ nsUrlClassifierUtils::MakeFindFullHashRequestV4(const char** aListNames,
|
||||
}
|
||||
threatInfo->add_threat_types((ThreatType)threatType);
|
||||
|
||||
#if defined(ANDROID)
|
||||
// Temporary hack to fix bug 1441345.
|
||||
if (((ThreatType)threatType == SOCIAL_ENGINEERING_PUBLIC) ||
|
||||
((ThreatType)threatType == SOCIAL_ENGINEERING)) {
|
||||
platform = LINUX_PLATFORM;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Add client states for index 'i' only when the threat type is available
|
||||
// on current platform.
|
||||
nsCString stateBinary;
|
||||
@@ -443,7 +461,7 @@ nsUrlClassifierUtils::MakeFindFullHashRequestV4(const char** aListNames,
|
||||
}
|
||||
|
||||
// 2) Set platform type.
|
||||
threatInfo->add_platform_types(GetPlatformType());
|
||||
threatInfo->add_platform_types(platform);
|
||||
|
||||
// 3) Set threat entry type.
|
||||
threatInfo->add_threat_entry_types(URL);
|
||||
|
||||
Reference in new issue
Block a user