From 5c2b659f297034060819146de3f908236cf0a829 Mon Sep 17 00:00:00 2001 From: Angel98518 Date: Tue, 6 Jan 2026 22:36:30 -0500 Subject: [PATCH] chore: Add validation for retryInterval in Monitor.validate() (#6628) --- server/model/monitor.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/server/model/monitor.js b/server/model/monitor.js index 35dfe84fd..7426e260a 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -1500,6 +1500,13 @@ class Monitor extends BeanModel { throw new Error(`Interval cannot be less than ${MIN_INTERVAL_SECOND} seconds`); } + if (this.retryInterval > MAX_INTERVAL_SECOND) { + throw new Error(`Retry interval cannot be more than ${MAX_INTERVAL_SECOND} seconds`); + } + if (this.retryInterval < MIN_INTERVAL_SECOND) { + throw new Error(`Retry interval cannot be less than ${MIN_INTERVAL_SECOND} seconds`); + } + if (this.type === "ping") { // ping parameters validation if (this.packetSize && (this.packetSize < PING_PACKET_SIZE_MIN || this.packetSize > PING_PACKET_SIZE_MAX)) {