浏览代码

[Minor] Detect encryption when libarchive is used

pull/4843/head
Vsevolod Stakhov 3 个月前
父节点
当前提交
35085a042f
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7
    0
      src/libmime/archives.c

+ 7
- 0
src/libmime/archives.c 查看文件

@@ -1135,6 +1135,7 @@ rspamd_7zip_read_folder(struct rspamd_task *task,
msg_debug_archive("7zip: read codec id: %L", tmp);

if (IS_SZ_ENCRYPTED(tmp)) {
msg_debug_archive("7zip: encrypted codec: %L", tmp);
arch->flags |= RSPAMD_ARCHIVE_ENCRYPTED;
}

@@ -1691,6 +1692,12 @@ rspamd_7zip_read_next_section(struct rspamd_task *task,
}
archive_read_data_skip(a);
}

if (archive_read_has_encrypted_entries(a) > 0) {
msg_debug_archive("7zip: found encrypted stuff");
arch->flags |= RSPAMD_ARCHIVE_ENCRYPTED;
}

archive_read_free(a);
p = NULL; /* Stop internal processor, as we rely on libarchive here */
break;

正在加载...
取消
保存