Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pb dans l'utilisation du plugin quand le mot de passe contient des caractères spéciaux #19

Open
mnpg opened this issue Nov 30, 2019 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@mnpg
Copy link

mnpg commented Nov 30, 2019

Pb dans l'utilisation du plugin - mot de passe avec caractères spéciaux

Etapes à reproduire (pour les bugs)

  1. Utiliser un compte meross dont le mot de passe contient des caractères spéciaux
  2. Aucune synchronisation n'est possible

Traceback (most recent call last):
File "/var/www/html/plugins/meross/3rdparty/meross.py", line 370, in
d_devices = ConnectAndRefreshAll(email, password)
File "/var/www/html/plugins/meross/3rdparty/meross.py", line 185, in ConnectAndRefreshAll
devices = httpHandler.list_supported_devices()
File "/var/www/html/plugins/meross/3rdparty/meross_iot/meross_iot/api.py", line 120, in list_supported_devices
for dev in self.list_devices():
File "/var/www/html/plugins/meross/3rdparty/meross_iot/meross_iot/api.py", line 114, in list_devices
raise UnauthorizedException()
meross_iot.api.UnauthorizedException

Contexte:

Lorsque le mot de passe du compte meross possède des caractères spéciaux, les commandes ne fonctionnent pas (sh meross.sh ... ou python3 meross.py....)

Proposition de solution (optionnel):

mettre le mot de passe entre quotes ( \' ):

  • Dans le fichier /var/www/html/plugins/meross/core/class/merossCmd.class.php, ligne 32
    remplacer la ligne par celle ci-dessous
    $command = 'sh ' . __DIR__ . '/../../3rdparty/meross.sh' . ' --email ' . $email . ' --password \'' . $password . '\' --uuid ' . $eqLogic->getLogicalId() . ' --show ';
  • Dans le fichier /var/www/html/plugins/meross/core/class/meross.class.php, ligne 65
    remplacer par la ligne par celle ci-dessous
    $command = "sh " . self::$_Script . ' --email ' . $email . ' --password \'' . $password . '\' ' . $_args;

Environnement:

  • Version NextDom:
  • Plateforme: Debian Stretch
  • Version du Plugin: develop
@mnpg mnpg changed the title Pb dans l'utilisation du plugin quand le mot de passe avec caractères spéciaux Pb dans l'utilisation du plugin quand le mot de passe contient des caractères spéciaux Nov 30, 2019
@slobberbone
Copy link
Contributor

@mnpg tu ne veux pas proposer une PR ?

@slobberbone slobberbone self-assigned this Jan 5, 2020
@slobberbone slobberbone added the bug Something isn't working label Jan 5, 2020
@fouille fouille mentioned this issue May 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants