[Tarantool-patches] [PATCH] box: replication shouldn't leak user password

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Tue Dec 24 19:46:27 MSK 2019


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


More information about the Tarantool-patches mailing list