hestiacp / hestiacp

Hestia Control Panel | A lightweight and powerful control panel for the modern web.
https://hestiacp.com
GNU General Public License v3.0
3.4k stars 680 forks source link

[Bug] Quoteshellarg() Error 500 when accessing Packages and Edit User #3635

Open mrdenisters opened 1 year ago

mrdenisters commented 1 year ago

Describe the bug

When creating/editing the user, package, server, error 500 appears during the conservation through the admin panel. Through Cli, everything works as expected Hestia CP 1.7.7 Debian 11 PHP 8.1 Default.

Tell us how to replicate the bug

Error when pressing the button to save. When this data is stored, and some are not.

Which components are affected by this bug?

Control Panel Web Interface

Hestia Control Panel Version

1.7.7

Operating system

Debian 11

Log capture

Stack trace:
#0 /usr/local/hestia/web/edit/server/index.php(600): Hestiacp\quoteshellarg\quoteshellarg()
#1 {main}
  thrown in /usr/local/hestia/web/inc/vendor/hestiacp/phpquoteshellarg/src/Hestiacp/quoteshellarg/quoteshellarg.php on line 14" while reading response header from upstream, client: 79.110.133.13, >
2023/05/27 14:15:11 [error] 483545#0: *1052 FastCGI sent in stderr: "PHP message: PHP Warning:  Undefined array key "v_php_versions" in /usr/local/hestia/web/edit/server/index.php on line 291; PHP>
Stack trace:
#0 /usr/local/hestia/web/edit/server/index.php(600): Hestiacp\quoteshellarg\quoteshellarg()
#1 {main}
  thrown in /usr/local/hestia/web/inc/vendor/hestiacp/phpquoteshellarg/src/Hestiacp/quoteshellarg/quoteshellarg.php on line 14" while reading response header from upstream, client: 79.110.133.13, >
2023/05/27 14:45:49 [error] 483545#0: *1069 FastCGI sent in stderr: "PHP message: PHP Warning:  Undefined array key "v_rule" in /usr/local/hestia/web/edit/firewall/index.php on line 123" while rea>
2023/05/27 15:11:53 [error] 483545#0: *1125 FastCGI sent in stderr: "PHP message: PHP Warning:  foreach() argument must be of type array|object, null given in /usr/local/hestia/web/templates/pages>
2023/05/27 15:13:44 [error] 483545#0: *1129 FastCGI sent in stderr: "PHP message: PHP Warning:  Undefined array key "v_shell" in /usr/local/hestia/web/edit/package/index.php on line 227; PHP messa>
Stack trace:
#0 /usr/local/hestia/web/edit/package/index.php(227): Hestiacp\quoteshellarg\quoteshellarg()
#1 {main}
  thrown in /usr/local/hestia/web/inc/vendor/hestiacp/phpquoteshellarg/src/Hestiacp/quoteshellarg/quoteshellarg.php on line 14" while reading response header from upstream, client: 79.110.133.13, >
2023/05/27 15:13:48 [error] 483545#0: *1131 FastCGI sent in stderr: "PHP message: PHP Warning:  foreach() argument must be of type array|object, null given in /usr/local/hestia/web/templates/pages>
2023/05/27 15:13:53 [error] 483545#0: *1131 FastCGI sent in stderr: "PHP message: PHP Warning:  foreach() argument must be of type array|object, null given in /usr/local/hestia/web/templates/pages>
2023/05/27 15:15:16 [error] 483545#0: *1135 FastCGI sent in stderr: "PHP message: PHP Warning:  Undefined array key "v_shell" in /usr/local/hestia/web/add/package/index.php on line 112; PHP messag>
Stack trace:
#0 /usr/local/hestia/web/add/package/index.php(112): Hestiacp\quoteshellarg\quoteshellarg()
#1 {main}
  thrown in /usr/local/hestia/web/inc/vendor/hestiacp/phpquoteshellarg/src/Hestiacp/quoteshellarg/quoteshellarg.php on line 14" while reading response header from upstream, client: 79.110.133.13, >
2023/05/27 15:15:18 [error] 483545#0: *1137 FastCGI sent in stderr: "PHP message: PHP Warning:  foreach() argument must be of type array|object, null given in /usr/local/hestia/web/templates/pages>
2023/05/27 15:21:54 [error] 483545#0: *1143 FastCGI sent in stderr: "PHP message: PHP Warning:  Undefined array key "v_php_versions" in /usr/local/hestia/web/edit/server/index.php on line 291; PHP>
Stack trace:
#0 /usr/local/hestia/web/edit/server/index.php(600): Hestiacp\quoteshellarg\quoteshellarg()
#1 {main}
  thrown in /usr/local/hestia/web/inc/vendor/hestiacp/phpquoteshellarg/src/Hestiacp/quoteshellarg/quoteshellarg.php on line 14" while reading response header from upstream, client: 79.110.133.13, >
2023/05/27 16:10:51 [error] 483545#0: *1173 FastCGI sent in stderr: "PHP message: PHP Warning:  foreach() argument must be of type array|object, null given in /usr/local/hestia/web/templates/pages>
2023/05/27 16:11:47 [error] 483545#0: *1175 FastCGI sent in stderr: "PHP message: PHP Warning:  Undefined array key "v_shell" in /usr/local/hestia/web/edit/user/index.php on line 365; PHP message:>
Stack trace:
#0 /usr/local/hestia/web/edit/user/index.php(369): Hestiacp\quoteshellarg\quoteshellarg()
#1 {main}
  thrown in /usr/local/hestia/web/inc/vendor/hestiacp/phpquoteshellarg/src/Hestiacp/quoteshellarg/quoteshellarg.php on line 14" while reading response header from upstream, client: 79.110.133.13, >
2023/05/27 16:11:54 [error] 483545#0: *1177 FastCGI sent in stderr: "PHP message: PHP Warning:  foreach() argument must be of type array|object, null given in /usr/local/hestia/web/templates/pages>
2023/05/27 16:12:15 [error] 483545#0: *1177 FastCGI sent in stderr: "PHP message: PHP Warning:  foreach() argument must be of type array|object, null given in /usr/local/hestia/web/templates/pages>
2023/05/27 16:12:58 [error] 483545#0: *1177 FastCGI sent in stderr: "PHP message: PHP Warning:  Undefined variable $v_record_id in /usr/local/hestia/web/templates/pages/edit_web.php on line 411" w>
2023/05/27 16:17:45 [error] 483545#0: *1186 FastCGI sent in stderr: "PHP message: PHP Warning:  Undefined variable $v_record_id in /usr/local/hestia/web/templates/pages/edit_web.php on line 411" w>
2023/05/28 09:07:15 [error] 483545#0: *1198 FastCGI sent in stderr: "PHP message: PHP Warning:  Undefined variable $error in /usr/local/hestia/web/templates/pages/login/login.php on line 11" while>
2023/05/28 09:07:18 [error] 483545#0: *1198 FastCGI sent in stderr: "PHP message: PHP Warning:  Undefined variable $ERROR in /usr/local/hestia/web/templates/pages/login/login_1.php on line 11" whi>
2023/05/28 10:30:14 [error] 483545#0: *1242 FastCGI sent in stderr: "PHP message: PHP Warning:  Undefined variable $error in /usr/local/hestia/web/templates/pages/login/login.php on line 11" while>
2023/05/28 10:30:17 [error] 483545#0: *1242 FastCGI sent in stderr: "PHP message: PHP Warning:  Undefined variable $ERROR in /usr/local/hestia/web/templates/pages/login/login_1.php on line 11" whi>
2023/05/28 10:30:46 [error] 483545#0: *1242 FastCGI sent in stderr: "PHP message: PHP Warning:  foreach() argument must be of type array|object, null given in /usr/local/hestia/web/templates/pages>
2023/05/28 10:31:38 [error] 483545#0: *1252 FastCGI sent in stderr: "PHP message: PHP Warning:  Undefined array key "v_role" in /usr/local/hestia/web/edit/user/index.php on line 346; PHP message: >
jaapmarcus commented 1 year ago

Issue should be solved with 1.8 release

mrdenisters commented 1 year ago

I updated the panel until 1.8.1 the problem while maintaining the server settings was solved, but 500 errors remain when adding a package, and editing the user.

ghost commented 1 year ago

@mrdenisters, can you kindly provide the trace logs from the system after having attempted to access Packages and Edit User?

mrdenisters commented 1 year ago

I updated the panel until 1.8.4 the problem while maintaining the server settings, and editing the user was solved, but 500 errors remain when adding a package.

jaapmarcus commented 1 year ago

Could you share the error message?

mrdenisters commented 1 year ago

2023/08/01 12:24:57 [error] 1658868#0: *57 FastCGI sent in stderr: "PHP message: PHP Warning: foreach() argument must be of type array|object, null given in /usr/local/hestia/web/templates/pages/> 2023/08/01 12:26:42 [error] 1658868#0: *62 FastCGI sent in stderr: "PHP message: PHP Warning: Undefined array key "v_shell" in /usr/local/hestia/web/add/package/index.php on line 112; PHP message> Stack trace: #0 /usr/local/hestia/web/add/package/index.php(112): Hestiacp\quoteshellarg\quoteshellarg() #1 {main} thrown in /usr/local/hestia/web/inc/vendor/hestiacp/phpquoteshellarg/src/Hestiacp/quoteshellarg/quoteshellarg.php on line 14" while reading response header from upstream, client: 79.110.133.13, > 2023/08/01 12:26:45 [error] 1658868#0: *62 FastCGI sent in stderr: "PHP message: PHP Warning: foreach() argument must be of type array|object, null given in /usr/local/hestia/web/templates/pages/> 2023/08/01 12:27:38 [error] 1658868#0: *66 FastCGI sent in stderr: "PHP message: PHP Warning: foreach() argument must be of type array|object, null given in /usr/local/hestia/web/templates/pages/> 2023/08/01 12:27:58 [error] 1658868#0: *66 FastCGI sent in stderr: "PHP message: PHP Warning: foreach() argument must be of type array|object, null given in /usr/local/hestia/web/templates/pages/> 2023/08/01 12:28:24 [error] 1658868#0: *66 FastCGI sent in stderr: "PHP message: PHP Warning: foreach() argument must be of type array|object, null given in /usr/local/hestia/web/templates/pages/> 2023/08/01 12:29:02 [error] 1658868#0: *72 FastCGI sent in stderr: "PHP message: PHP Warning: foreach() argument must be of type array|object, null given in /usr/local/hestia/web/templates/pages/> 2023/08/01 12:35:38 [error] 1658868#0: *76 FastCGI sent in stderr: "PHP message: PHP Warning: foreach() argument must be of type array|object, null given in /usr/local/hestia/web/templates/pages/>

mrdenisters commented 1 year ago

изображение I noticed that the list with the choice of values is emptry.

jaapmarcus commented 1 year ago

Strange

v-list-sys-shells json

Should list the availble shells

jaapmarcus commented 1 year ago

изображение I noticed that the list with the choice of values is emptry.

Can you check /etc/shells content?

mrdenisters commented 1 year ago

Can you check /etc/shells content?

/bin/sh /bin/dash /bin/bash /bin/rbash /sbin/nologin /usr/bin/rssh /sbin/nologin /usr/sbin/nologin изображение