Comparing version 2.3.2 to 2.3.3
20
net.js
@@ -596,9 +596,10 @@ // Generated by CoffeeScript 1.10.0 | ||
result = 0; | ||
} else { | ||
} | ||
if (a.length !== b.length) { | ||
left = b; | ||
result = 1; | ||
} | ||
len = Math.min(a.length, b.length); | ||
len = Math.min(left.length, right.length); | ||
for (i = k = 0, ref = len; 0 <= ref ? k < ref : k > ref; i = 0 <= ref ? ++k : --k) { | ||
result |= xor_bytes(a[i], b[i]); | ||
result |= left[i] ^ right[i]; | ||
} | ||
@@ -615,3 +616,3 @@ return result === 0; | ||
handshake_callback = function(buf) { | ||
var auth_message, authentication, b, client_final_message_without_proof, client_key, client_proof, client_signature, first_equals, i, item, j, k, l, len1, len2, ref, ref1, salted_password, server_key, server_reply, status_buf, status_str, stored_key, v; | ||
var auth_message, authentication, b, client_final_message_without_proof, client_key, client_proof, client_signature, error1, first_equals, i, item, j, json_error, k, l, len1, len2, ref, ref1, salted_password, server_key, server_reply, status_buf, status_str, stored_key, v; | ||
_this.buffer = Buffer.concat([_this.buffer, buf]); | ||
@@ -626,3 +627,8 @@ j = 0; | ||
status_str = status_buf.toString(); | ||
server_reply = JSON.parse(status_str); | ||
try { | ||
server_reply = JSON.parse(status_str); | ||
} catch (error1) { | ||
json_error = error1; | ||
throw new err.ReqlDriverError(status_str); | ||
} | ||
if (state === 1) { | ||
@@ -655,3 +661,3 @@ if (!server_reply.success) { | ||
auth_i = parseInt(authentication.i); | ||
if (!auth_r.substr(0, r_string) === r_string) { | ||
if (!(auth_r.substr(0, r_string.length) === r_string)) { | ||
throw new err.ReqlAuthError("Invalid nonce from server"); | ||
@@ -941,3 +947,3 @@ } | ||
} else { | ||
host = hostOrCallback; | ||
host = hostOrCallback || {}; | ||
} | ||
@@ -944,0 +950,0 @@ return new Promise(function(resolve, reject) { |
{ "name" : "rethinkdb" | ||
, "version" : "2.3.2" | ||
, "version" : "2.3.3" | ||
, "main" : "rethinkdb" | ||
@@ -4,0 +4,0 @@ , "description" : "This package provides the JavaScript driver library for the RethinkDB database server for use in your node application." |
209464
5964