From 588551413862644fe0f945c9dc388a9b7c3a13a5 Mon Sep 17 00:00:00 2001 From: maplescene <1610009092@qq.com> Date: Sun, 25 May 2025 23:46:17 +0800 Subject: [PATCH] Update mongo.lua (#2054) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 这里运算符有优先级问题 --- lualib/skynet/db/mongo.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lualib/skynet/db/mongo.lua b/lualib/skynet/db/mongo.lua index 8f5430bb..ac8739da 100644 --- a/lualib/skynet/db/mongo.lua +++ b/lualib/skynet/db/mongo.lua @@ -243,7 +243,7 @@ function auth_method:auth_scram_sha1(username,password) local salt = parsed_t['s'] local rnonce = parsed_t['r'] - if not string.sub(rnonce, 1, 12) == nonce then + if string.sub(rnonce, 1, 12) ~= nonce then skynet.error("Server returned an invalid nonce.") return false end