(identifier: string)
| 63 | } |
| 64 | |
| 65 | export function sanitizeIdentifier(identifier: string): string { |
| 66 | if (identifier.includes('.')) { |
| 67 | const parts = identifier.split('.') |
| 68 | return parts.map((part) => sanitizeSingleIdentifier(part)).join('.') |
| 69 | } |
| 70 | |
| 71 | return sanitizeSingleIdentifier(identifier) |
| 72 | } |
| 73 | |
| 74 | /** |
| 75 | * Validates a WHERE clause to prevent SQL injection attacks |
no test coverage detected