(host: string)
| 89 | } |
| 90 | |
| 91 | function isPrivateOrLoopbackIPv6(host: string): boolean { |
| 92 | const stripped = host.startsWith('[') && host.endsWith(']') ? host.slice(1, -1) : host |
| 93 | const lower = stripped.toLowerCase() |
| 94 | if (lower === '::' || lower === '::1') return true |
| 95 | if (/^fc[0-9a-f]{2}:/.test(lower) || /^fd[0-9a-f]{2}:/.test(lower)) return true |
| 96 | if (lower.startsWith('fe80:')) return true |
| 97 | return false |
| 98 | } |
| 99 | |
| 100 | export function checkSapExternalUrlSafety( |
| 101 | rawUrl: string, |
no test coverage detected