diff --git a/changelogs/fragments/phpshell_config.yml b/changelogs/fragments/phpshell_config.yml new file mode 100644 index 00000000..8b7fcc0b --- /dev/null +++ b/changelogs/fragments/phpshell_config.yml @@ -0,0 +1,2 @@ +bugfixes: + - set `global $config;` in phpshell() to find update commands in pfSense Plus 24.11 diff --git a/plugins/module_utils/pfsense.py b/plugins/module_utils/pfsense.py index 7236e04d..4f1ccd89 100644 --- a/plugins/module_utils/pfsense.py +++ b/plugins/module_utils/pfsense.py @@ -639,7 +639,7 @@ def uniqid(prefix='', more_entropy=False): def phpshell(self, command): """ Run a command in the php developer shell """ - command = "global $debug;\n$debug = 1;\n" + command + "\nexec\nexit" + command = "global $debug;\n$debug = 1;\nglobal $config;\n" + command + "\nexec\nexit" # Dummy argument suppresses displaying help message return self.module.run_command('/usr/local/sbin/pfSsh.php dummy', data=command)