jeedom / core

Software for home automation
https://www.jeedom.com
GNU General Public License v2.0
383 stars 312 forks source link

protect function system::fuserk #2697

Closed Mips2648 closed 2 weeks ago

Mips2648 commented 2 weeks ago

Description

Some plugins call system::fuserk(jeedom::getUsbMapping($port)); but jeedom::getUsbMapping($port) will return an array if port is an empty string and then we got error Erreur sur la fonction deamon_start du plugin : file_exists(): Argument #1 ($filename) must be of type string, array given exemple: https://community.jeedom.com/t/dsm7-docker-erreurs-sur-plugins-protocole-domotique/127102

so the goal of this PR is to protect system::fuserk function by validating argument

Suggested changelog entry

issue:

2561

Types of changes

PR checklist