Update server/monitor-types/system-service.js

Co-authored-by: Frank Elsinga <frank@elsinga.de>
This commit is contained in:
iotux 2026-01-01 08:37:42 +01:00 committed by GitHub
parent 6c93930d3e
commit f3c554d0ec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -42,9 +42,7 @@ class SystemServiceMonitorType extends MonitorType {
// SECURITY: Prevent Argument Injection
// Only allow alphanumeric, dots, dashes, underscores, and @
if (!serviceName || !/^[a-zA-Z0-9._\-@]+$/.test(serviceName)) {
heartbeat.status = DOWN;
heartbeat.msg = "Invalid service name. Please use the internal Service Name (no spaces).";
reject(new Error(heartbeat.msg));
reject(new Error("Invalid service name. Please use the internal Service Name (no spaces)."));
return;
}