1
0
Fork 0
mirror of https://github.com/openstf/stf synced 2025-10-05 10:39:25 +02:00

Don't add clients to the broadcast set until they're authenticated. Note

that actual, real auth is not checked yet.
This commit is contained in:
Simo Kinnunen 2015-09-14 19:38:12 +09:00
parent bff4b7bafe
commit 5cc27a86ad
2 changed files with 6 additions and 3 deletions

View file

@ -110,9 +110,11 @@ module.exports = syrup.serial()
connState.sentFrameTime = connState.lastFrameTime connState.sentFrameTime = connState.lastFrameTime
} }
screenStream.broadcastSet.insert(id, { conn.on('authenticated', function() {
onStart: vncStartListener screenStream.broadcastSet.insert(id, {
, onFrame: vncFrameListener onStart: vncStartListener
, onFrame: vncFrameListener
})
}) })
conn.on('fbupdaterequest', function() { conn.on('fbupdaterequest', function() {

View file

@ -253,6 +253,7 @@ VncConnection.prototype._read = function() {
} }
debug('client security', this._clientSecurity) debug('client security', this._clientSecurity)
this._writeSecurityResult(VncConnection.SECURITYRESULT_OK) this._writeSecurityResult(VncConnection.SECURITYRESULT_OK)
this.emit('authenticated')
this._changeState(VncConnection.STATE_NEED_CLIENT_INIT) this._changeState(VncConnection.STATE_NEED_CLIENT_INIT)
} }
break break