Merge pull request #113 from vvalchev/re-request-auth-on-login-failure
Fixes #112 - Re-auth doesn't work if incorrect auth was provided initially
This commit is contained in:
commit
9f551774f6
3 changed files with 5 additions and 1 deletions
File diff suppressed because one or more lines are too long
|
@ -156,6 +156,8 @@ socket.on('error', function (err) {
|
|||
}
|
||||
})
|
||||
|
||||
socket.on('reauth',reauthSession)
|
||||
|
||||
term.on('title', function (title) {
|
||||
document.title = title
|
||||
})
|
||||
|
|
|
@ -152,6 +152,8 @@ module.exports = function socket (socket) {
|
|||
console.log('WebSSH2 ' + 'error: Authentication failure'.red.bold +
|
||||
' user=' + socket.request.session.username.yellow.bold.underline +
|
||||
' from=' + socket.handshake.address.yellow.bold.underline)
|
||||
|
||||
socket.emit('reauth')
|
||||
} else {
|
||||
console.log('WebSSH2 Logout: user=' + socket.request.session.username + ' from=' + socket.handshake.address + ' host=' + socket.request.session.ssh.host + ' port=' + socket.request.session.ssh.port + ' sessionID=' + socket.request.sessionID + '/' + socket.id + ' allowreplay=' + socket.request.session.ssh.allowreplay + ' term=' + socket.request.session.ssh.term)
|
||||
if (err) {
|
||||
|
|
Loading…
Reference in a new issue