mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-17 13:53:45 +02:00
Ensure reserved environment names aren't changed, fix undefined variable, ref #412
This commit is contained in:
@@ -53,6 +53,30 @@ class ServiceVariable extends Model
|
||||
'user_editable' => 'integer',
|
||||
];
|
||||
|
||||
/**
|
||||
* Reserved environment variable names.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected static $reservedNames = [
|
||||
'SERVER_MEMORY',
|
||||
'SERVER_IP',
|
||||
'SERVER_PORT',
|
||||
'ENV',
|
||||
'HOME',
|
||||
'USER',
|
||||
];
|
||||
|
||||
/**
|
||||
* Returns an array of environment variable names that cannot be used.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function reservedNames()
|
||||
{
|
||||
return self::$reservedNames;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the display executable for the option and will use the parent
|
||||
* service one if the option does not have one defined.
|
||||
|
||||
Reference in New Issue
Block a user