Skip to content

Commit 6bbdac5

Browse files
authored
Fix
1 parent 6d29999 commit 6bbdac5

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

config/var/www/admin/control-panel/classes/SystemCommand.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,13 @@ public static function getNetworkIP() {
6767

6868
/**
6969
* Get service status
70-
* @param string $service Service name (validated, alphanumeric + dash only)
70+
* @param string $service Service name (validated, alphanumeric + dash/underscore/dot)
7171
* @return string|false Service status (active/inactive) or false on error
7272
*/
7373
public static function getServiceStatus($service) {
74-
// Validate service name (alphanumeric, dash, underscore only)
75-
if (!preg_match('/^[a-zA-Z0-9_-]+$/', $service)) {
74+
// Validate service name (alphanumeric, dash, underscore, dot only)
75+
// Dot added to support PHP-FPM services like php-fpm8.4
76+
if (!preg_match('/^[a-zA-Z0-9._-]+$/', $service)) {
7677
return false;
7778
}
7879

0 commit comments

Comments
 (0)