danielperna84 / hass-configurator

Configuration UI for Home Assistant
MIT License
313 stars 168 forks source link

Password Type Error #108

Closed dtesta closed 6 years ago

dtesta commented 6 years ago

Short numeric passwords (ex. 123456) are treated as an int instead of string, causing a missing attribute error on line 3510 (currently) of configurator.py

Traceback (most recent call last):
  File "/configurator.py", line 4841, in <module>
    main(sys.argv[1:])
  File "/configurator.py", line 4776, in main
    load_settings(None)
  File "/configurator.py", line 3510, in load_settings
    if PASSWORD and PASSWORD.startswith("{sha256}"):
AttributeError: 'int' object has no attribute 'startswith'

Passwords/PIN like this are weak, but sufficient for local-only installs. Should be a pretty easy fix, but I won't have a chance to look into it until at least the weekend.

danielperna84 commented 6 years ago

You are correct. Has been mentioned in the forum already. Will be fixed in the next version. Thank you for opening the issue so I won't forget about it. :)