diff options
author | Jeremy Harris <jgh@wizmail.org> | 2016-12-16 20:45:44 +0000 |
---|---|---|
committer | Jeremy Harris <jgh@wizmail.org> | 2016-12-18 14:02:28 +0000 |
commit | 87cb4a166c47b57df48c2918e47801d77639fbb0 (patch) | |
tree | 315721ad1ecede575e36521fd19a0f64b2ae4a2b /src | |
parent | 142622b3f385bfcc36eae176763a7225c2e49b3c (diff) |
Fix DKIM information leakage
Diffstat (limited to 'src')
-rw-r--r-- | src/src/dkim.c | 1 | ||||
-rw-r--r-- | src/src/transports/smtp.c | 16 |
2 files changed, 12 insertions, 5 deletions
diff --git a/src/src/dkim.c b/src/src/dkim.c index 3fa11c800..70c9547ec 100644 --- a/src/src/dkim.c +++ b/src/src/dkim.c @@ -612,6 +612,7 @@ while ((dkim_signing_domain = string_nextinlist(&dkim_domain, &sep, CS dkim_private_key_expanded, PDKIM_ALGO_RSA_SHA256, dkim->dot_stuffed); + dkim_private_key_expanded[0] = '\0'; pdkim_set_optional(ctx, CS dkim_sign_headers_expanded, NULL, diff --git a/src/src/transports/smtp.c b/src/src/transports/smtp.c index d6ef34eff..a19e85ffb 100644 --- a/src/src/transports/smtp.c +++ b/src/src/transports/smtp.c @@ -285,10 +285,11 @@ static uschar *rf_names[] = { US"NEVER", US"SUCCESS", US"FAILURE", US"DELAY" }; /* Local statics */ -static uschar *smtp_command; /* Points to last cmd for error messages */ -static uschar *mail_command; /* Points to MAIL cmd for error messages */ -static BOOL update_waiting; /* TRUE to update the "wait" database */ -static BOOL pipelining_active; /* current transaction is in pipe mode */ +static uschar *smtp_command; /* Points to last cmd for error messages */ +static uschar *mail_command; /* Points to MAIL cmd for error messages */ +static uschar *data_command = US""; /* Points to DATA cmd for error messages */ +static BOOL update_waiting; /* TRUE to update the "wait" database */ +static BOOL pipelining_active; /* current transaction is in pipe mode */ /************************************************* @@ -1390,10 +1391,14 @@ uschar * buffer = tctx->buffer; /* Write SMTP chunk header command */ if (chunk_size > 0) + { if((cmd_count = smtp_write_command(tctx->outblock, FALSE, "BDAT %u%s\r\n", chunk_size, flags & tc_chunk_last ? " LAST" : "") ) < 0) return ERROR; + if (flags & tc_chunk_last) + data_command = string_copy(big_buffer); /* Save for later error message */ + } prev_cmd_count = cmd_count += tctx->cmd_count; @@ -2512,6 +2517,7 @@ if ( !(peer_offered & PEER_OFFERED_CHUNKING) default: goto RESPONSE_FAILED; /* I/O error, or any MAIL/DATA error */ } pipelining_active = FALSE; + data_command = string_copy(big_buffer); /* Save for later error message */ } /* If there were no good recipients (but otherwise there have been no @@ -2735,7 +2741,7 @@ else #else "LMTP error after %s: %s", #endif - big_buffer, string_printing(buffer)); + data_command, string_printing(buffer)); setflag(addr, af_pass_message); /* Allow message to go to user */ if (buffer[0] == '5') addr->transport_return = FAIL; |