serverinfo icon indicating copy to clipboard operation
serverinfo copied to clipboard

[Bug]: Missing Error handling OCA\\ServerInfo\\OperatingSystems\\DefaultOs::executeCommand()

Open darix opened this issue 3 years ago • 0 comments

⚠️ This issue respects the following points: ⚠️

  • [X] This is a bug, not a question or a configuration/webserver/proxy issue.
  • [X] This issue is not already reported on Github (I've searched it).
  • [X] Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
  • [X] Nextcloud Server is running on 64bit capable CPU, PHP and OS.
  • [X] I agree to follow Nextcloud's Code of Conduct.

Bug description

missing error handling for failed execution which leads to:

"message":"OCA\\ServerInfo\\OperatingSystems\\DefaultOs::executeCommand(): Return value must be of type string, bool returned in file '/srv/www/vhosts/nextcloud/public/apps/serverinfo/lib/OperatingSystems/DefaultOs.php'

Steps to reproduce

  1. run php-fpm with an apparmor profile for nextcloud https://nordisch.org/posts/php-fpm-apparmor/
  2. apparmor profiles denies bash/df execution.

Expected behavior

Error should be handled gracefully

Installation method

Other Community project

Operating system

Other

PHP engine version

PHP 8.1

Web server

Nginx

Database engine version

PostgreSQL

Is this bug present after an update or on a fresh install?

Fresh Nextcloud Server install

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

  • [X] Default user-backend (database)
  • [ ] LDAP/ Active Directory
  • [ ] SSO - SAML
  • [ ] Other

Configuration report

-

List of activated Apps

-

Nextcloud Signing status

-

Nextcloud Logs

-

Additional info

darix avatar Aug 20 '22 12:08 darix