Skip to main content

assertHeaderSafe

@retinue/monorepo


@retinue/monorepo / backend/src / assertHeaderSafe

Function: assertHeaderSafe()

assertHeaderSafe(field, value): void

Defined in: backend/src/toolkit/mime.ts:64

Refuses a header value that would inject another header.

Refusing rather than stripping: no legitimate subject or address contains a newline, so nothing correct is lost, and silently removing it would hide an attempt somebody should see.

Parameters​

field​

string

value​

string

Returns​

void