From: Calin Crisan Date: Sat, 2 Sep 2017 18:51:08 +0000 (+0300) Subject: fix authentication issue with remote motionEye cameras X-Git-Url: http://www.vanbest.org/gitweb/?a=commitdiff_plain;h=1d4041c0ca81c0911a8a20f47b7fae179c2ce167;p=motioneye-debian fix authentication issue with remote motionEye cameras --- 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') {