Skip to content

Commit

Permalink
denied no authentification
Browse files Browse the repository at this point in the history
  • Loading branch information
zoic21 authored Sep 1, 2024
1 parent 69c0c5e commit 818ee35
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/class/mqtt2.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -495,6 +495,9 @@ public static function deamon_start() {
$mqtt2_path = realpath(dirname(__FILE__) . '/../../resources/mqtt2d');
chdir($mqtt2_path);
$authentifications = explode(':', explode("\n", config::byKey('mqtt::password', __CLASS__))[0]);
if (count($authentifications) != 2) {
throw new Exception(__('Aucune autentification trouvée, impossible de lancer le démon', __FILE__));
}
$cmd = system::getCmdSudo() . ' /usr/bin/node ' . $mqtt2_path . '/mqtt2d.js';
$cmd .= ' --loglevel ' . log::convertLogLevel(log::getLogLevel(__CLASS__));
$cmd .= ' --socketport ' . config::byKey('socketport', __CLASS__);
Expand Down

0 comments on commit 818ee35

Please sign in to comment.