headerSafe strips CR/LF so attacker-controlled subject/filename/content-type can't inject extra headers into the reconstructed scan MIME.
(s string)
| 136 | // headerSafe strips CR/LF so attacker-controlled subject/filename/content-type can't |
| 137 | // inject extra headers into the reconstructed scan MIME. |
| 138 | func headerSafe(s string) string { |
| 139 | return strings.NewReplacer("\r", "", "\n", "", "\"", "").Replace(s) |
| 140 | } |
| 141 | |
| 142 | // blockAuditID derives a STABLE soft-ref message id for a blocked send. A block |
| 143 | // persists no message row, so the audit/event must anchor to a deterministic id |