[MultiDB] sonic-utilities - replace redis-cli/redis-dump with sonic-db-cli/sonic-db-dump#810
Conversation
…b-cli/sonic-db-dump
|
depends on sonic-net/sonic-py-swsssdk#62, need sonic-db-dump command merged first |
|
retest this please |
scripts/generate_dump
Outdated
| local db_name=$2 | ||
| save_cmd "redis-dump -d $db -s /var/run/redis/redis.sock -y" "$db_name.json" | ||
| local db_name=$1 | ||
| save_cmd "sonic-db-dump -n $db_name -y" "$db_name.json" |
There was a problem hiding this comment.
$db_name [](start = 31, length = 8)
Escape it to prevent input injection. #Closed
There was a problem hiding this comment.
is this what you mean to?
There was a problem hiding this comment.
Sorry I mean quotation instead of escaping the $db_name variable. If it is quoted properly, sonic-db-dump will find malicious input easily.
No need to add new restriction on db_name here.
In reply to: 377958584 [](ancestors = 377958584)
There was a problem hiding this comment.
OK. GOT IT. UPDATED
|
retest this please |
4 similar comments
|
retest this please |
|
retest this please |
|
retest this please |
|
retest this please |
|
sonic-net/sonic-py-swsssdk#62. already in, can we merge this now ? @qiluo-msft |
…b-cli/sonic-db-dump (sonic-net#810) * [MultiDB] sonic-utilities - replace redis-cli/redis-dump with sonic-db-cli/sonic-db-dump * only accept upper and underscore to prevent injection * quotation on db_name
Signed-off-by: Dong Zhang d.zhang@alibaba-inc.com