From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp51.i.mail.ru (smtp51.i.mail.ru [94.100.177.111]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 7BDA746970E for ; Tue, 24 Dec 2019 19:46:29 +0300 (MSK) References: <20191212212543.37466-1-maria.khaydich@tarantool.org> <1577185959.824466484@f134.i.mail.ru> From: Vladislav Shpilevoy Message-ID: <71bc669b-7e6c-4331-31f3-bf337eddacd7@tarantool.org> Date: Tue, 24 Dec 2019 17:46:27 +0100 MIME-Version: 1.0 In-Reply-To: <1577185959.824466484@f134.i.mail.ru> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Tarantool-patches] [PATCH] box: replication shouldn't leak user password List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Maria Khaydich Cc: tarantool-patches@dev.tarantool.org Thanks for the fixes! Now I noticed, that the new test passes even without the fix. This is because symbol '-' in test_run:grep_log() is considered a special symbol of regular expr. It needs to be escaped. Escape in Lua regexp is done by %. I've pushed my review fix on top of this commit. See it below and on the branch. ================================================================================ diff --git a/test/box/cfg.result b/test/box/cfg.result index d75148adf..fe20eea01 100644 --- a/test/box/cfg.result +++ b/test/box/cfg.result @@ -598,7 +598,7 @@ test_run:grep_log('cfg_tester7', 'set \'replication\' configuration option to', | - set 'replication' configuration option to | ... -- test there is no password in log -test_run:grep_log('cfg_tester7', 'test-cluster-cookie', 1000) +test_run:grep_log('cfg_tester7', 'test%-cluster%-cookie', 1000) | --- | - null | ... diff --git a/test/box/cfg.test.lua b/test/box/cfg.test.lua index a80844c0e..ba273bb73 100644 --- a/test/box/cfg.test.lua +++ b/test/box/cfg.test.lua @@ -150,6 +150,6 @@ test_run:cmd("start server cfg_tester7") -- test there is replication log in log test_run:grep_log('cfg_tester7', 'set \'replication\' configuration option to', 1000) -- test there is no password in log -test_run:grep_log('cfg_tester7', 'test-cluster-cookie', 1000) +test_run:grep_log('cfg_tester7', 'test%-cluster%-cookie', 1000) test_run:cmd("stop server cfg_tester7") test_run:cmd("cleanup server cfg_tester7")