dovecot-2.2: fts: Never put text/plain contents through fts-pars...

dovecot at dovecot.org dovecot at dovecot.org
Thu Apr 17 08:30:16 UTC 2014


details:   http://hg.dovecot.org/dovecot-2.2/rev/45e7980f6507
changeset: 17232:45e7980f6507
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Apr 17 10:27:43 2014 +0200
description:
fts: Never put text/plain contents through fts-parsers.

diffstat:

 src/plugins/fts/fts-parser.c |  6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diffs (16 lines):

diff -r e4119adae01d -r 45e7980f6507 src/plugins/fts/fts-parser.c
--- a/src/plugins/fts/fts-parser.c	Thu Apr 17 10:26:11 2014 +0200
+++ b/src/plugins/fts/fts-parser.c	Thu Apr 17 10:27:43 2014 +0200
@@ -17,6 +17,12 @@
 {
 	unsigned int i;
 
+	if (strcmp(content_type, "text/plain") == 0) {
+		/* we probably don't want/need to allow parsers to handle
+		   plaintext? */
+		return NULL;
+	}
+
 	for (i = 0; i < N_ELEMENTS(parsers); i++) {
 		*parser_r = parsers[i]->try_init(user, content_type,
 						 content_disposition);


More information about the dovecot-cvs mailing list