]> source.dussan.org Git - rspamd.git/commitdiff
Fix headers end detection for DKIM.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 5 Jan 2014 20:23:51 +0000 (20:23 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 5 Jan 2014 20:23:51 +0000 (20:23 +0000)
src/dkim.c

index d864165aca76bbe5bbe90860973d640b4c11d40d..e40c6969e0f512613788c03f2cddcd2ff153c0e5 100644 (file)
@@ -1401,10 +1401,10 @@ rspamd_dkim_check (rspamd_dkim_context_t *ctx, rspamd_dkim_key_t *key, struct wo
                                headers_end = p + 1;
                                break;
                        }
-                       else if (got_lf && *(p - 1) == '\n') {
-                               /* \n\r case */
-                               headers_end = p + 1;
-                               break;
+                       else if (got_lf && *(p - 1) != '\n') {
+                               /* Sequence is broken */
+                               got_lf = FALSE;
+                               got_cr = TRUE;
                        }
                        else {
                                got_cr = TRUE;