Skip to content

Commit 8eb8012

Browse files
Nighelles DavidNighelles David
authored andcommitted
Fixing check for server nonce
OTS by @VeXocide
1 parent 80a5bc9 commit 8eb8012

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1142,7 +1142,7 @@ class TcpConnection extends Connection
11421142
auth_salt = new Buffer(authentication.s, 'base64')
11431143
auth_i = parseInt(authentication.i)
11441144

1145-
if not auth_r.substr(0, r_string) == r_string
1145+
if not (auth_r.substr(0, r_string.length) == r_string)
11461146
throw new err.ReqlAuthError("Invalid nonce from server")
11471147

11481148
client_final_message_without_proof = "c=biws,r=" + auth_r

0 commit comments

Comments
 (0)