]> www.vanbest.org Git - motioneye-debian/commitdiff
store normal password in plain text
authorCalin Crisan <ccrisan@gmail.com>
Thu, 7 Sep 2017 19:32:21 +0000 (22:32 +0300)
committerCalin Crisan <ccrisan@gmail.com>
Thu, 7 Sep 2017 19:32:21 +0000 (22:32 +0300)
Unfortunately we must store the surveillance (normal) password in plain
text. The reason is that we need it afterwards when we build the camera
config, to properly set a username:password for the streaming auth.

motioneye/config.py

index b87fe8d6080c43463bcb1455e29f806e90f4ce89..b3593e455caed71bb19257d5cc2eaf6f874d2273 100644 (file)
@@ -669,11 +669,7 @@ def main_ui_to_dict(ui):
         call_hook(ui['admin_username'], ui['admin_password'])
 
     if ui.get('normal_password') is not None:
-        if ui['normal_password']:
-            data['@normal_password'] = hashlib.sha1(ui['normal_password']).hexdigest()
-
-        else:
-            data['@normal_password'] = ''
+        data['@normal_password'] = ui['normal_password']
 
         call_hook(ui['normal_username'], ui['normal_password'])