Skip to content

Commit

Permalink
store normal password in plain text
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ccrisan committed Sep 7, 2017
1 parent 1d4041c commit 7a8b5d7
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions motioneye/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -669,11 +669,7 @@ def call_hook(u, p):
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'])

Expand Down

0 comments on commit 7a8b5d7

Please sign in to comment.