diff options
author | Azul <azul@riseup.net> | 2012-10-15 12:54:24 +0200 |
---|---|---|
committer | Azul <azul@riseup.net> | 2012-10-15 12:54:24 +0200 |
commit | cb8e9f7b3dec1963e0d985b1b2541b260a132762 (patch) | |
tree | 73854991148d794c411a2beee8bebb1ae871cb43 /src/srp.js | |
parent | 6feb77060140fe8026812970c4d5ea83da3cd200 (diff) |
expecting the salt to be send with key salt
Diffstat (limited to 'src/srp.js')
-rw-r--r-- | src/srp.js | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -19,9 +19,14 @@ function SRP(remote, session) // B = 0 will make the algorithm always succeed // -> refuse such a server answer if(response.B === 0) { - srp.error("Server send random number 0 - this is not allowed"); - } else { - session.calculations(response.s, response.B); + srp.error("Server send random number 0 - could not login."); + } + else if(! response.salt || response.salt === 0) { + srp.error("Server failed to send salt - could not login."); + } + else + { + session.calculations(response.salt, response.B); remote.authenticate(session, confirm_authentication); } } |