Update server/monitor-types/system-service.js
Co-authored-by: Frank Elsinga <frank@elsinga.de>
This commit is contained in:
parent
6c93930d3e
commit
f3c554d0ec
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user