Severity: Warning
File: src/Servy.Core/Helpers/ServiceValidator.cs, lines 35–37
Description:
ValidateDto checks dto.StopTimeout < AppConfig.MinStopTimeout (lower bound = 1 second) but has NO upper-bound check. AppConfig.MaxStopTimeout is 86,400 seconds (24 hours).
The upper-bound check exists only in the UI/CLI validators (ServiceConfigurationValidator). ServiceValidator.ValidateDto is used by JsonServiceValidator and XmlServiceValidator for import flows — meaning an imported JSON/XML config with StopTimeout = 999999 passes validation without error.
The same gap exists for StartTimeout.
Suggested fix:
Add upper-bound checks:
if (dto.StopTimeout > AppConfig.MaxStopTimeout) return (false, "Stop Timeout exceeds maximum.");
if (dto.StartTimeout > AppConfig.MaxStartTimeout) return (false, "Start Timeout exceeds maximum.");
Severity: Warning
File:
src/Servy.Core/Helpers/ServiceValidator.cs, lines 35–37Description:
ValidateDtochecksdto.StopTimeout < AppConfig.MinStopTimeout(lower bound = 1 second) but has NO upper-bound check.AppConfig.MaxStopTimeoutis 86,400 seconds (24 hours).The upper-bound check exists only in the UI/CLI validators (
ServiceConfigurationValidator).ServiceValidator.ValidateDtois used byJsonServiceValidatorandXmlServiceValidatorfor import flows — meaning an imported JSON/XML config withStopTimeout = 999999passes validation without error.The same gap exists for
StartTimeout.Suggested fix:
Add upper-bound checks: