Skip to content

Commit ff6a1eb

Browse files
committed
fix(gateway): add port range validation to lock file write
1 parent fb06fac commit ff6a1eb

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/infra/gateway-lock.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ export async function acquireGatewayLock(
208208
if (typeof startTime === "number" && Number.isFinite(startTime)) {
209209
payload.startTime = startTime;
210210
}
211-
if (typeof port === "number" && Number.isFinite(port)) {
211+
if (typeof port === "number" && Number.isFinite(port) && port > 0 && port <= 65535) {
212212
payload.port = port;
213213
}
214214
await handle.writeFile(JSON.stringify(payload), "utf8");

0 commit comments

Comments
 (0)