You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
106 lines
5.9 KiB
106 lines
5.9 KiB
1 year ago
|
diff -up chromium-114.0.5735.35/chrome/browser/safe_browsing/download_protection/file_analyzer.cc.nounrar chromium-114.0.5735.35/chrome/browser/safe_browsing/download_protection/file_analyzer.cc
|
||
|
--- chromium-114.0.5735.35/chrome/browser/safe_browsing/download_protection/file_analyzer.cc.nounrar 2023-05-18 00:37:47.000000000 +0200
|
||
|
+++ chromium-114.0.5735.35/chrome/browser/safe_browsing/download_protection/file_analyzer.cc 2023-05-21 18:12:30.368425080 +0200
|
||
|
@@ -77,8 +77,6 @@ void FileAnalyzer::Start(const base::Fil
|
||
|
|
||
|
if (inspection_type == DownloadFileType::ZIP) {
|
||
|
StartExtractZipFeatures();
|
||
|
- } else if (inspection_type == DownloadFileType::RAR) {
|
||
|
- StartExtractRarFeatures();
|
||
|
#if BUILDFLAG(IS_MAC)
|
||
|
} else if (inspection_type == DownloadFileType::DMG) {
|
||
|
StartExtractDmgFeatures();
|
||
|
diff -up chromium-114.0.5735.35/chrome/common/safe_browsing/archive_analyzer.cc.nounrar chromium-114.0.5735.35/chrome/common/safe_browsing/archive_analyzer.cc
|
||
|
--- chromium-114.0.5735.35/chrome/common/safe_browsing/archive_analyzer.cc.nounrar 2023-05-18 00:37:48.000000000 +0200
|
||
|
+++ chromium-114.0.5735.35/chrome/common/safe_browsing/archive_analyzer.cc 2023-05-21 18:11:14.870058635 +0200
|
||
|
@@ -8,7 +8,6 @@
|
||
|
#include "build/build_config.h"
|
||
|
#include "build/buildflag.h"
|
||
|
#include "chrome/common/safe_browsing/archive_analyzer_results.h"
|
||
|
-#include "chrome/common/safe_browsing/rar_analyzer.h"
|
||
|
#include "chrome/common/safe_browsing/seven_zip_analyzer.h"
|
||
|
#include "chrome/common/safe_browsing/zip_analyzer.h"
|
||
|
#include "components/safe_browsing/content/common/proto/download_file_types.pb.h"
|
||
|
@@ -23,9 +22,7 @@ namespace safe_browsing {
|
||
|
// static
|
||
|
std::unique_ptr<ArchiveAnalyzer> ArchiveAnalyzer::CreateForArchiveType(
|
||
|
DownloadFileType_InspectionType file_type) {
|
||
|
- if (file_type == DownloadFileType::RAR) {
|
||
|
- return std::make_unique<RarAnalyzer>();
|
||
|
- } else if (file_type == DownloadFileType::ZIP) {
|
||
|
+ if (file_type == DownloadFileType::ZIP) {
|
||
|
return std::make_unique<ZipAnalyzer>();
|
||
|
} else if (file_type == DownloadFileType::SEVEN_ZIP) {
|
||
|
return std::make_unique<SevenZipAnalyzer>();
|
||
|
diff -up chromium-114.0.5735.35/chrome/common/safe_browsing/BUILD.gn.nounrar chromium-114.0.5735.35/chrome/common/safe_browsing/BUILD.gn
|
||
|
--- chromium-114.0.5735.35/chrome/common/safe_browsing/BUILD.gn.nounrar 2023-05-18 00:37:48.000000000 +0200
|
||
|
+++ chromium-114.0.5735.35/chrome/common/safe_browsing/BUILD.gn 2023-05-21 18:11:14.869058617 +0200
|
||
|
@@ -145,8 +145,6 @@ source_set("safe_browsing") {
|
||
|
"protobuf_message_log_macros.h",
|
||
|
"protobuf_message_read_macros.h",
|
||
|
"protobuf_message_write_macros.h",
|
||
|
- "rar_analyzer.cc",
|
||
|
- "rar_analyzer.h",
|
||
|
"seven_zip_analyzer.cc",
|
||
|
"seven_zip_analyzer.h",
|
||
|
"zip_analyzer.cc",
|
||
|
@@ -162,7 +160,6 @@ source_set("safe_browsing") {
|
||
|
"//components/safe_browsing/content/common:file_type_policies",
|
||
|
"//components/safe_browsing/core/common",
|
||
|
"//third_party/lzma_sdk/google:seven_zip_reader",
|
||
|
- "//third_party/unrar:unrar",
|
||
|
]
|
||
|
|
||
|
if (is_linux) {
|
||
|
diff -up chromium-114.0.5735.35/chrome/common/safe_browsing/zip_analyzer.cc.nounrar chromium-114.0.5735.35/chrome/common/safe_browsing/zip_analyzer.cc
|
||
|
--- chromium-114.0.5735.35/chrome/common/safe_browsing/zip_analyzer.cc.nounrar 2023-05-18 00:37:48.000000000 +0200
|
||
|
+++ chromium-114.0.5735.35/chrome/common/safe_browsing/zip_analyzer.cc 2023-05-21 18:11:14.869058617 +0200
|
||
|
@@ -18,7 +18,6 @@
|
||
|
#include "base/time/time.h"
|
||
|
#include "build/build_config.h"
|
||
|
#include "chrome/common/safe_browsing/archive_analyzer_results.h"
|
||
|
-#include "chrome/common/safe_browsing/rar_analyzer.h"
|
||
|
#include "components/safe_browsing/content/common/file_type_policies.h"
|
||
|
#include "components/safe_browsing/core/common/features.h"
|
||
|
#include "components/safe_browsing/core/common/proto/csd.pb.h"
|
||
|
diff -up chromium-114.0.5735.35/chrome/services/file_util/safe_archive_analyzer.cc.nounrar chromium-114.0.5735.35/chrome/services/file_util/safe_archive_analyzer.cc
|
||
|
--- chromium-114.0.5735.35/chrome/services/file_util/safe_archive_analyzer.cc.nounrar 2023-05-18 00:37:48.000000000 +0200
|
||
|
+++ chromium-114.0.5735.35/chrome/services/file_util/safe_archive_analyzer.cc 2023-05-21 18:11:14.870058635 +0200
|
||
|
@@ -71,6 +71,7 @@ void SafeArchiveAnalyzer::AnalyzeRarFile
|
||
|
base::File rar_file,
|
||
|
mojo::PendingRemote<chrome::mojom::TemporaryFileGetter> temp_file_getter,
|
||
|
AnalyzeRarFileCallback callback) {
|
||
|
+#if 0
|
||
|
DCHECK(rar_file.IsValid());
|
||
|
temp_file_getter_.Bind(std::move(temp_file_getter));
|
||
|
callback_ = std::move(callback);
|
||
|
@@ -86,6 +87,9 @@ void SafeArchiveAnalyzer::AnalyzeRarFile
|
||
|
rar_analyzer_.Analyze(std::move(rar_file), base::FilePath(),
|
||
|
std::move(analysis_finished_callback),
|
||
|
std::move(temp_file_getter_callback), &results_);
|
||
|
+#else
|
||
|
+ NOTREACHED();
|
||
|
+#endif
|
||
|
}
|
||
|
|
||
|
void SafeArchiveAnalyzer::AnalyzeSevenZipFile(
|
||
|
diff -up chromium-114.0.5735.35/chrome/services/file_util/safe_archive_analyzer.h.nounrar chromium-114.0.5735.35/chrome/services/file_util/safe_archive_analyzer.h
|
||
|
--- chromium-114.0.5735.35/chrome/services/file_util/safe_archive_analyzer.h.nounrar 2023-05-18 00:37:48.000000000 +0200
|
||
|
+++ chromium-114.0.5735.35/chrome/services/file_util/safe_archive_analyzer.h 2023-05-21 18:11:14.870058635 +0200
|
||
|
@@ -6,7 +6,6 @@
|
||
|
#define CHROME_SERVICES_FILE_UTIL_SAFE_ARCHIVE_ANALYZER_H_
|
||
|
|
||
|
#include "chrome/common/safe_browsing/archive_analyzer_results.h"
|
||
|
-#include "chrome/common/safe_browsing/rar_analyzer.h"
|
||
|
#include "chrome/common/safe_browsing/seven_zip_analyzer.h"
|
||
|
#include "chrome/common/safe_browsing/zip_analyzer.h"
|
||
|
#include "chrome/services/file_util/public/mojom/safe_archive_analyzer.mojom.h"
|
||
|
@@ -63,7 +62,6 @@ class SafeArchiveAnalyzer : public chrom
|
||
|
void Timeout();
|
||
|
|
||
|
safe_browsing::ZipAnalyzer zip_analyzer_;
|
||
|
- safe_browsing::RarAnalyzer rar_analyzer_;
|
||
|
safe_browsing::SevenZipAnalyzer seven_zip_analyzer_;
|
||
|
#if BUILDFLAG(IS_MAC)
|
||
|
safe_browsing::dmg::DMGAnalyzer dmg_analyzer_;
|