From d406bab504f558296cba0ccfb2011f55b894b0e8 Mon Sep 17 00:00:00 2001 From: Johnny Miller Date: Thu, 15 Jan 2015 17:49:31 +0300 Subject: [PATCH] (cqlsh) Escape clqshrc passwords properly patch by Johnny Miller; reviewed by Aleksey Yeschenko for CASSANDRA-8618 --- CHANGES.txt | 1 + bin/cqlsh | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index d2802ad1cc..94a2dbddfc 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.3 + * (cqlsh) Escape clqshrc passwords properly (CASSANDRA-8618) * Fix NPE when passing wrong argument in ALTER TABLE statement (CASSANDRA-8355) * Pig: Refactor and deprecate CqlStorage (CASSANDRA-8599) * Don't reuse the same cleanup strategy for all sstables (CASSANDRA-8537) diff --git a/bin/cqlsh b/bin/cqlsh index 363a4f64de..0254fad264 100755 --- a/bin/cqlsh +++ b/bin/cqlsh @@ -1905,9 +1905,12 @@ def read_options(cmdlineargs, environment): configs = ConfigParser.SafeConfigParser() configs.read(CONFIG_FILE) + rawconfigs = ConfigParser.RawConfigParser() + rawconfigs.read(CONFIG_FILE) + optvalues = optparse.Values() optvalues.username = option_with_default(configs.get, 'authentication', 'username') - optvalues.password = option_with_default(configs.get, 'authentication', 'password') + optvalues.password = option_with_default(rawconfigs.get, 'authentication', 'password') optvalues.keyspace = option_with_default(configs.get, 'authentication', 'keyspace') optvalues.completekey = option_with_default(configs.get, 'ui', 'completekey', DEFAULT_COMPLETEKEY)