MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / headerSafe

Function headerSafe

internal/agent/screening.go:138–140  ·  view source on GitHub ↗

headerSafe strips CR/LF so attacker-controlled subject/filename/content-type can't inject extra headers into the reconstructed scan MIME.

(s string)

Source from the content-addressed store, hash-verified

136// headerSafe strips CR/LF so attacker-controlled subject/filename/content-type can't
137// inject extra headers into the reconstructed scan MIME.
138func 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

Callers 1

composeScanBodyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected