'use strict'; // One structural trust boundary for every import/export dialect. Adapters map // fields; they do not get to decide whether prototypes, cycles or giant nested // values are safe. `sanitizeHtml` is injected by the server so this pure module // stays usable in plain-Node tests and in client bundles. const BLOCKED_KEYS = new Set(['__proto__', 'prototype', 'constructor']); const SECRET_KEY = /(?:password|passwd|secret|api[_-]?key|api[_-]?token|auth[_-]?token|private[_-]?key|login[_-]?token)/i; // A refusal of the boundary's OWN: a size limit, a cycle or a non-plain // object. secureTransfer records only these as an attempt by the user // (models/lib/transferFailure.cjs); anything else that throws during the walk - // sanitize-html 2.18.0's stack overflow on nested