File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11const { MonitorType } = require ( "./monitor-type" ) ;
22const { log, UP } = require ( "../../src/util" ) ;
33const mqtt = require ( "mqtt" ) ;
4- const { createHash } = require ( "crypto" ) ;
54const jsonata = require ( "jsonata" ) ;
65const { ConditionVariable } = require ( "../monitor-conditions/variables" ) ;
76const { defaultStringOperators, defaultNumberOperators } = require ( "../monitor-conditions/operators" ) ;
@@ -228,10 +227,7 @@ class MqttMonitorType extends MonitorType {
228227 }
229228 }
230229
231- // Key shared connections by broker URL + credentials (hashed to avoid storing plaintext credentials)
232- const connectionKey = createHash ( "sha256" )
233- . update ( `${ mqttUrl } \x00${ username ?? "" } \x00${ password ?? "" } ` )
234- . digest ( "hex" ) ;
230+ const connectionKey = `${ mqttUrl } \x00${ username ?? "" } ` ;
235231
236232 // If this monitor previously used a different broker or topic, release the old subscription
237233 const prevState = this . monitorStates . get ( monitorId ) ;
You can’t perform that action at this time.
0 commit comments