ZoneMinder / zmeventnotification

Machine Learning powered Secure Websocket & MQTT based ZoneMinder event notification server
412 stars 128 forks source link

bad bcrypt settings at ./zmeventnotification.test.pl line 938 #182

Closed kamuisamuro closed 4 years ago

kamuisamuro commented 4 years ago

Hello,

After upgrading Zoneminder from 1.32 to 1.33 the zmeventnotification 4.6.1 started to crash everytime zmNinja was opened. The error was "bad bcrypt settings at ./zmeventnotification.test.pl line 938".

I believe it could be because in the DB the password is prefixed with "-ZM-". I tried to substr($saved_pass,4) and although it stopped crashing, was getting "bad authentication provided".

Error:

12/11/2019 11:31:41.910798 zmeventnotification.test[22388].INF [main:606] [Web Socket Event Server listening on port 9000]
12/11/2019 11:31:49.571183 zmeventnotification.test[22388].INF [main:606] [got a websocket connection from ::ffff:192.168.1.107 (1) active connections]
12/11/2019 11:31:49.643719 zmeventnotification.test[22388].INF [main:606] [Websockets: New Connection Handshake requested from ::ffff:192.168.1.107:36589 state=pending auth, id=1576078309.64318]
bad bcrypt settings at ./zmeventnotification.test.pl line 938.

After attempting to hack zmeventnotification.pl with the substr($saved_pass,4):

12/11/2019 11:27:15.040166 zmeventnotification.test[22109].INF [main:606] [Websockets: New Connection Handshake requested from ::ffff:192.168.1.107:47045 state=pending auth, id=1576078035.03969]
12/11/2019 11:27:15.438947 zmeventnotification.test[22109].INF [main:606] [marking for deletion - bad authentication provided by ::ffff:192.168.1.107]
....
pliablepixels commented 4 years ago

You need to first log into ZM console to migrate that --ZM-- password to a bcrypt one. Then the ES should work.

kamuisamuro commented 4 years ago

Thank you. It works now.

Great app by the way.