From 1d4041c0ca81c0911a8a20f47b7fae179c2ce167 Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Sat, 2 Sep 2017 21:51:08 +0300 Subject: [PATCH] fix authentication issue with remote motionEye cameras --- motioneye/static/js/main.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/motioneye/static/js/main.js b/motioneye/static/js/main.js index 329bc78..e1e64ab 100644 --- a/motioneye/static/js/main.js +++ b/motioneye/static/js/main.js @@ -3752,6 +3752,10 @@ function runAddCameraDialog() { data.username = usernameEntry.val(); data.password = passwordEntry.val(); data.proto = typeSelect.val(); + + if (data.proto == 'motioneye') { + data.password = sha1(data.password); + } cameraMsgLabel.html(''); @@ -3817,7 +3821,7 @@ function runAddCameraDialog() { data = splitCameraUrl(urlEntry.val()); data.proto = 'motioneye'; data.username = usernameEntry.val(); - data.password = passwordEntry.val(); + data.password = sha1(passwordEntry.val()); data.remote_camera_id = addCameraSelect.val(); } else if (typeSelect.val() == 'netcam') { -- 2.39.5