mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Added a test
This commit is contained in:
parent
07ba7ffea5
commit
22366471d0
@ -0,0 +1,2 @@
|
|||||||
|
0
|
||||||
|
0
|
23
tests/queries/0_stateless/01317_no_password_in_command_line.sh
Executable file
23
tests/queries/0_stateless/01317_no_password_in_command_line.sh
Executable file
@ -0,0 +1,23 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||||
|
. $CURDIR/../shell_config.sh
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
$CLICKHOUSE_CLIENT --query "DROP USER IF EXISTS user"
|
||||||
|
$CLICKHOUSE_CLIENT --query "CREATE USER user IDENTIFIED WITH PLAINTEXT_PASSWORD BY 'hello'"
|
||||||
|
|
||||||
|
# False positive result due to race condition with sleeps is Ok.
|
||||||
|
|
||||||
|
$CLICKHOUSE_CLIENT --user user --password hello --query "SELECT sleep(1)" &
|
||||||
|
sleep 0.1
|
||||||
|
ps auxw | grep -F -- '--password' | grep -F hello ||:
|
||||||
|
wait
|
||||||
|
|
||||||
|
$CLICKHOUSE_CLIENT --user user --password=hello --query "SELECT sleep(1)" &
|
||||||
|
sleep 0.1
|
||||||
|
ps auxw | grep -F -- '--password' | grep -F hello ||:
|
||||||
|
wait
|
||||||
|
|
||||||
|
$CLICKHOUSE_CLIENT --query "DROP USER user"
|
Loading…
Reference in New Issue
Block a user