diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-03-15 13:18:34 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2024-03-15 13:18:34 +0000 |
commit | 1d0ff299f57e94b297d4215fc4429c2aabbc40ba (patch) | |
tree | 025a056b29592a8e0734b1e59fbf0eaf66a2d65a /src/libmime | |
parent | c4ddccba821ed6ec6c54ffdf751e96172a19f6d0 (diff) | |
download | rspamd-1d0ff299f57e94b297d4215fc4429c2aabbc40ba.tar.gz rspamd-1d0ff299f57e94b297d4215fc4429c2aabbc40ba.zip |
[Fix] Do not save multipatterns to FS in certain cases
Diffstat (limited to 'src/libmime')
-rw-r--r-- | src/libmime/lang_detection.c | 2 | ||||
-rw-r--r-- | src/libmime/message.c | 2 | ||||
-rw-r--r-- | src/libmime/mime_parser.c | 8 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/libmime/lang_detection.c b/src/libmime/lang_detection.c index bdd0aad74..c485de5ad 100644 --- a/src/libmime/lang_detection.c +++ b/src/libmime/lang_detection.c @@ -898,7 +898,7 @@ rspamd_language_detector_init(struct rspamd_config *cfg) rspamd_language_detector_process_chain(cfg, chain); }); - if (!rspamd_multipattern_compile(ret->stop_words[i].mp, &err)) { + if (!rspamd_multipattern_compile(ret->stop_words[i].mp, 0, &err)) { msg_err_config("cannot compile stop words for %z language group: %e", i, err); g_error_free(err); diff --git a/src/libmime/message.c b/src/libmime/message.c index 4fb118e60..f73c1ee35 100644 --- a/src/libmime/message.c +++ b/src/libmime/message.c @@ -674,7 +674,7 @@ rspamd_check_gtube(struct rspamd_task *task, struct rspamd_mime_text_part *part) RSPAMD_MULTIPATTERN_DEFAULT); GError *err = NULL; - rspamd_multipattern_compile(gtube_matcher, &err); + rspamd_multipattern_compile(gtube_matcher, RSPAMD_MULTIPATTERN_COMPILE_NO_FS, &err); if (err != NULL) { /* It will be expensive, but I don't care, still better than to abort */ diff --git a/src/libmime/mime_parser.c b/src/libmime/mime_parser.c index 217f0b87d..562a9d7de 100644 --- a/src/libmime/mime_parser.c +++ b/src/libmime/mime_parser.c @@ -1,11 +1,11 @@ -/*- - * Copyright 2016 Vsevolod Stakhov +/* + * Copyright 2024 Vsevolod Stakhov * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, @@ -169,7 +169,7 @@ rspamd_mime_parser_init_lib(void) rspamd_multipattern_add_pattern(lib_ctx->mp_boundary, "\n--", 0); GError *err = NULL; - if (!rspamd_multipattern_compile(lib_ctx->mp_boundary, &err)) { + if (!rspamd_multipattern_compile(lib_ctx->mp_boundary, RSPAMD_MULTIPATTERN_COMPILE_NO_FS, &err)) { msg_err("fatal error: cannot compile multipattern for mime parser boundaries: %e", err); g_error_free(err); g_abort(); |