(value: string | undefined, max: number, pattern: RegExp)
| 342 | const SAFE_ACCOUNT_ID_RE = /^[a-zA-Z0-9._-]+$/; |
| 343 | |
| 344 | function safeKey(value: string | undefined, max: number, pattern: RegExp): string | null { |
| 345 | if (!value || value.length === 0 || value.length > max) return null; |
| 346 | if (!pattern.test(value)) return null; |
| 347 | return value; |
| 348 | } |
| 349 | |
| 350 | /** Derive a session key from the request context. |
| 351 | * |
no outgoing calls
no test coverage detected