mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-04 21:04:37 +08:00
Fix safe fetch DNS guard lint
Some checks failed
DB migration compat / Check if migrations changed (push) Has been cancelled
DB migration compat / Back-compat — Current branch migrations with ${{ needs.check-migrations-changed.outputs.base_branch }} branch code (push) Has been cancelled
DB migration compat / Forward-compat — Current branch code with ${{ needs.check-migrations-changed.outputs.base_branch }} branch migrations (push) Has been cancelled
DB migration compat / No migration changes (skipped) (push) Has been cancelled
Some checks failed
DB migration compat / Check if migrations changed (push) Has been cancelled
DB migration compat / Back-compat — Current branch migrations with ${{ needs.check-migrations-changed.outputs.base_branch }} branch code (push) Has been cancelled
DB migration compat / Forward-compat — Current branch code with ${{ needs.check-migrations-changed.outputs.base_branch }} branch migrations (push) Has been cancelled
DB migration compat / No migration changes (skipped) (push) Has been cancelled
This commit is contained in:
parent
8998828c69
commit
beb7d04968
@ -126,10 +126,10 @@ async function resolveSafeFetchUrl(raw: string): Promise<ResolvedSafeFetchUrl |
|
||||
return { kind: "error", reason: "hostname resolves to a disallowed IP range" };
|
||||
}
|
||||
}
|
||||
const selected = resolved[0];
|
||||
if (!selected) {
|
||||
if (resolved.length === 0) {
|
||||
return { kind: "error", reason: `DNS lookup returned no addresses for ${hostname}` };
|
||||
}
|
||||
const selected = resolved[0];
|
||||
const family = toIpFamily(selected);
|
||||
if (family === null) {
|
||||
return { kind: "error", reason: `DNS lookup returned unsupported address family for ${hostname}` };
|
||||
|
||||
Loading…
Reference in New Issue
Block a user