]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
pop3-migration: Fix to 2f19f8 - Don't convert LF also to '?' in header hashes.
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Sun, 24 Jan 2016 17:54:51 +0000 (19:54 +0200)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Sun, 24 Jan 2016 17:54:51 +0000 (19:54 +0200)
src/plugins/pop3-migration/pop3-migration-plugin.c

index 055d17edc6fb1de3adf8e4c68ead942dd8206c20..c29dec0f16f895e886ef5b8e9992d9fb9a647501 100644 (file)
@@ -199,7 +199,8 @@ int pop3_migration_get_hdr_sha1(uint32_t mail_seq, struct istream *input,
                   which hopefully will satisfy everybody.
                */
                for (i = start = 0; i < size; i++) {
-                       if (data[i] < 0x20 || data[i] >= 0x80) {
+                       if ((data[i] < 0x20 || data[i] >= 0x80) &&
+                           data[i] != '\n') {
                                sha1_loop(&sha1_ctx, data + start, i-start);
                                sha1_loop(&sha1_ctx, "?", 1);
                                start = i+1;