diff options
Diffstat (limited to 'javascript/srp.js')
-rw-r--r-- | javascript/srp.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/javascript/srp.js b/javascript/srp.js index b84786e..b04a350 100644 --- a/javascript/srp.js +++ b/javascript/srp.js @@ -185,6 +185,11 @@ function SRP() if(response.error) { that.error_message(response.error); } + // B = 0 will make the algorithm always succeed - refuse such a server + // answer + else if(response.B == 0) { + that.error_message("Server send random number 0 - this is not allowed"); + } // If there is no algorithm specified, calculate M given s, B, and P else if(!response.a) { |