(endpoint: string)
| 31 | const ENDPOINT_PATTERN = /^[a-zA-Z0-9_-]+(?:\/[a-zA-Z0-9_-]+)*$/ |
| 32 | |
| 33 | function isValidEndpoint(endpoint: string): boolean { |
| 34 | if (!endpoint) return false |
| 35 | if (endpoint.includes('..')) return false |
| 36 | return ENDPOINT_PATTERN.test(endpoint) |
| 37 | } |
| 38 | |
| 39 | async function getAuthorizedAdminUserId() { |
| 40 | const session = await getSession() |