mirror of
https://github.com/koichixD/uptime-kuma.git
synced 2026-09-04 09:13:21 +00:00
Update server/monitor-types/system-service.js
Co-authored-by: Frank Elsinga <frank@elsinga.de>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user