2022-03-18 15:41:41 +00:00
|
|
|
Index: electron-17.1.0/chrome/common/safe_browsing/BUILD.gn
|
2021-06-29 20:42:56 +00:00
|
|
|
===================================================================
|
2022-03-18 15:41:41 +00:00
|
|
|
--- electron-17.1.0.orig/chrome/common/safe_browsing/BUILD.gn 2022-03-07 17:20:32.164818543 +0100
|
|
|
|
|
+++ electron-17.1.0/chrome/common/safe_browsing/BUILD.gn 2022-03-09 08:25:16.218473339 +0100
|
2022-01-27 22:16:50 +00:00
|
|
|
@@ -58,39 +58,6 @@ if (safe_browsing_mode == 1) {
|
|
|
|
|
public_deps = [ "//components/safe_browsing/core/common/proto:csd_proto" ]
|
2021-06-29 20:42:56 +00:00
|
|
|
}
|
2022-01-27 22:16:50 +00:00
|
|
|
|
2021-06-29 20:42:56 +00:00
|
|
|
- source_set("rar_analyzer") {
|
|
|
|
|
- sources = [
|
|
|
|
|
- "rar_analyzer.cc",
|
|
|
|
|
- "rar_analyzer.h",
|
|
|
|
|
- ]
|
|
|
|
|
-
|
|
|
|
|
- deps = [
|
|
|
|
|
- ":archive_analyzer_results",
|
|
|
|
|
- ":download_type_util",
|
|
|
|
|
- "//base",
|
|
|
|
|
- "//base:i18n",
|
2022-01-27 22:16:50 +00:00
|
|
|
- "//components/safe_browsing/content/common:file_type_policies",
|
|
|
|
|
- "//components/safe_browsing/core/common",
|
2021-06-29 20:42:56 +00:00
|
|
|
- "//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",
|
|
|
|
|
- ]
|
|
|
|
|
-
|
2022-01-27 22:16:50 +00:00
|
|
|
- public_deps = [ "//components/safe_browsing/core/common/proto:csd_proto" ]
|
2021-06-29 20:42:56 +00:00
|
|
|
- }
|
2022-01-27 22:16:50 +00:00
|
|
|
-
|
|
|
|
|
if (is_linux || is_win) {
|
|
|
|
|
source_set("document_analyzer") {
|
|
|
|
|
sources = [
|
|
|
|
|
@@ -189,7 +156,6 @@ source_set("safe_browsing") {
|
2021-06-29 20:42:56 +00:00
|
|
|
":archive_analyzer_results",
|
|
|
|
|
":binary_feature_extractor",
|
|
|
|
|
":download_type_util",
|
|
|
|
|
- ":rar_analyzer",
|
2022-01-27 22:16:50 +00:00
|
|
|
"//components/safe_browsing/core/common",
|
2023-01-18 06:07:26 +00:00
|
|
|
"//third_party/lzma_sdk/google:seven_zip_reader",
|
2021-06-29 20:42:56 +00:00
|
|
|
]
|
2022-03-18 15:41:41 +00:00
|
|
|
Index: electron-17.1.0/chrome/common/safe_browsing/DEPS
|
2021-06-29 20:42:56 +00:00
|
|
|
===================================================================
|
2022-03-18 15:41:41 +00:00
|
|
|
--- electron-17.1.0.orig/chrome/common/safe_browsing/DEPS 2022-03-07 17:20:32.164818543 +0100
|
|
|
|
|
+++ electron-17.1.0/chrome/common/safe_browsing/DEPS 2022-03-09 08:25:16.218473339 +0100
|
2023-01-18 06:07:26 +00:00
|
|
|
@@ -3,7 +3,6 @@ include_rules = [
|
2022-01-27 22:16:50 +00:00
|
|
|
"+components/safe_browsing/core/common",
|
|
|
|
|
"+third_party/maldoca",
|
2021-06-29 20:42:56 +00:00
|
|
|
"+third_party/protobuf",
|
|
|
|
|
- "+third_party/unrar",
|
|
|
|
|
"+third_party/zlib",
|
2023-01-18 06:07:26 +00:00
|
|
|
"+third_party/lzma_sdk/google",
|
2021-06-29 20:42:56 +00:00
|
|
|
]
|
2022-03-18 15:41:41 +00:00
|
|
|
Index: electron-17.1.0/chrome/services/file_util/BUILD.gn
|
2022-01-27 22:16:50 +00:00
|
|
|
===================================================================
|
2022-03-18 15:41:41 +00:00
|
|
|
--- electron-17.1.0.orig/chrome/services/file_util/BUILD.gn 2022-03-07 17:20:32.260818933 +0100
|
|
|
|
|
+++ electron-17.1.0/chrome/services/file_util/BUILD.gn 2022-03-09 08:25:16.218473339 +0100
|
2022-01-27 22:16:50 +00:00
|
|
|
@@ -60,7 +60,6 @@ source_set("file_util") {
|
|
|
|
|
deps += [
|
|
|
|
|
"//chrome/common/safe_browsing",
|
|
|
|
|
"//chrome/common/safe_browsing:archive_analyzer_results",
|
|
|
|
|
- "//chrome/common/safe_browsing:rar_analyzer",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
if (is_linux || is_win) {
|
2022-03-18 15:41:41 +00:00
|
|
|
Index: electron-17.1.0/chrome/services/file_util/safe_archive_analyzer.cc
|
2021-06-29 20:42:56 +00:00
|
|
|
===================================================================
|
2022-03-18 15:41:41 +00:00
|
|
|
--- electron-17.1.0.orig/chrome/services/file_util/safe_archive_analyzer.cc 2022-03-07 17:20:32.264818949 +0100
|
|
|
|
|
+++ electron-17.1.0/chrome/services/file_util/safe_archive_analyzer.cc 2022-03-09 08:25:16.218473339 +0100
|
2023-01-18 06:07:26 +00:00
|
|
|
@@ -44,12 +44,16 @@ void SafeArchiveAnalyzer::AnalyzeDmgFile
|
2021-06-29 20:42:56 +00:00
|
|
|
void SafeArchiveAnalyzer::AnalyzeRarFile(base::File rar_file,
|
|
|
|
|
base::File temporary_file,
|
|
|
|
|
AnalyzeRarFileCallback callback) {
|
|
|
|
|
+#if 0
|
|
|
|
|
DCHECK(rar_file.IsValid());
|
|
|
|
|
|
|
|
|
|
safe_browsing::ArchiveAnalyzerResults results;
|
|
|
|
|
safe_browsing::rar_analyzer::AnalyzeRarFile(
|
|
|
|
|
std::move(rar_file), std::move(temporary_file), &results);
|
|
|
|
|
std::move(callback).Run(results);
|
|
|
|
|
+#else
|
|
|
|
|
+ NOTREACHED();
|
|
|
|
|
+#endif
|
|
|
|
|
}
|
2023-01-18 06:07:26 +00:00
|
|
|
|
|
|
|
|
void SafeArchiveAnalyzer::AnalyzeSevenZipFile(
|