Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: Maria Khaydich <maria.khaydich@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: Re: [Tarantool-patches] [PATCH] box: replication shouldn't leak user password
Date: Tue, 24 Dec 2019 17:46:27 +0100	[thread overview]
Message-ID: <71bc669b-7e6c-4331-31f3-bf337eddacd7@tarantool.org> (raw)
In-Reply-To: <1577185959.824466484@f134.i.mail.ru>

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")

  reply	other threads:[~2019-12-24 16:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-12 21:25 Maria
2019-12-17 21:56 ` Vladislav Shpilevoy
2019-12-24 11:12   ` Maria Khaydich
2019-12-24 16:46     ` Vladislav Shpilevoy [this message]
2020-02-26 16:14 ` Igor Munkin
2020-03-03 17:26   ` Maria Khaydich
2020-03-05  4:49 ` Kirill Yukhin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=71bc669b-7e6c-4331-31f3-bf337eddacd7@tarantool.org \
    --to=v.shpilevoy@tarantool.org \
    --cc=maria.khaydich@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH] box: replication shouldn'\''t leak user password' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox