12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- description: disable support for safe browsing inspection of rar files
- author: Michael Gilbert <mgilbert@debian.org>
- bug: http://bugs.debian.org/914487
- --- a/chrome/browser/safe_browsing/download_protection/file_analyzer.cc
- +++ b/chrome/browser/safe_browsing/download_protection/file_analyzer.cc
- @@ -93,7 +93,7 @@ void FileAnalyzer::Start(const base::Fil
- if (inspection_type == DownloadFileType::ZIP) {
- StartExtractZipFeatures();
- } else if (inspection_type == DownloadFileType::RAR) {
- - StartExtractRarFeatures();
- + LOG(WARNING) << "Safebrowser inspection of rar files is disabled in this build";
- #if defined(OS_MACOSX)
- } else if (inspection_type == DownloadFileType::DMG) {
- StartExtractDmgFeatures();
- --- a/chrome/common/safe_browsing/BUILD.gn
- +++ b/chrome/common/safe_browsing/BUILD.gn
- @@ -57,39 +57,6 @@ if (safe_browsing_mode == 1) {
- public_deps = [ "//components/safe_browsing/core:csd_proto" ]
- }
-
- - source_set("rar_analyzer") {
- - sources = [
- - "rar_analyzer.cc",
- - "rar_analyzer.h",
- - ]
- -
- - deps = [
- - ":archive_analyzer_results",
- - ":download_type_util",
- - "//base",
- - "//base:i18n",
- - "//components/safe_browsing/core:features",
- - "//components/safe_browsing/core:file_type_policies",
- - "//third_party/unrar:unrar",
- - ]
- -
- - defines = [
- - "_FILE_OFFSET_BITS=64",
- - "LARGEFILE_SOURCE",
- - "RAR_SMP",
- - "SILENT",
- -
- - # The following is set to disable certain macro definitions in the unrar
- - # source code.
- - "CHROMIUM_UNRAR",
- -
- - # Disables exceptions in unrar, replaces them with process termination.
- - "UNRAR_NO_EXCEPTIONS",
- - ]
- -
- - public_deps = [ "//components/safe_browsing/core:csd_proto" ]
- - }
- -
- source_set("disk_image_type_sniffer_mac") {
- sources = [
- "disk_image_type_sniffer_mac.cc",
- @@ -156,7 +123,6 @@ source_set("safe_browsing") {
- ":archive_analyzer_results",
- ":binary_feature_extractor",
- ":download_type_util",
- - ":rar_analyzer",
- "//components/safe_browsing/core:features",
- ]
-
- --- a/chrome/services/file_util/safe_archive_analyzer.cc
- +++ b/chrome/services/file_util/safe_archive_analyzer.cc
- @@ -7,7 +7,6 @@
- #include "base/macros.h"
- #include "build/build_config.h"
- #include "chrome/common/safe_browsing/archive_analyzer_results.h"
- -#include "chrome/common/safe_browsing/rar_analyzer.h"
- #include "chrome/common/safe_browsing/zip_analyzer.h"
- #include "mojo/public/cpp/bindings/strong_binding.h"
-
- @@ -48,8 +47,7 @@ void SafeArchiveAnalyzer::AnalyzeRarFile
- AnalyzeRarFileCallback callback) {
- DCHECK(rar_file.IsValid());
-
- + LOG(FATAL) << "AnalyzeRarFile is disabled in this build";
- safe_browsing::ArchiveAnalyzerResults results;
- - safe_browsing::rar_analyzer::AnalyzeRarFile(
- - std::move(rar_file), std::move(temporary_file), &results);
- std::move(callback).Run(results);
- }
|