You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by al...@apache.org on 2015/01/15 15:50:57 UTC

cassandra git commit: (cqlsh) Escape clqshrc passwords properly

Repository: cassandra
Updated Branches:
  refs/heads/cassandra-2.1 2ff913767 -> d406bab50


(cqlsh) Escape clqshrc passwords properly

patch by Johnny Miller; reviewed by Aleksey Yeschenko for CASSANDRA-8618


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/d406bab5
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d406bab5
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d406bab5

Branch: refs/heads/cassandra-2.1
Commit: d406bab504f558296cba0ccfb2011f55b894b0e8
Parents: 2ff9137
Author: Johnny Miller <jm...@datastax.com>
Authored: Thu Jan 15 17:49:31 2015 +0300
Committer: Aleksey Yeschenko <al...@apache.org>
Committed: Thu Jan 15 17:50:35 2015 +0300

----------------------------------------------------------------------
 CHANGES.txt | 1 +
 bin/cqlsh   | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d406bab5/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index d2802ad..94a2dbd 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)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d406bab5/bin/cqlsh
----------------------------------------------------------------------
diff --git a/bin/cqlsh b/bin/cqlsh
index 363a4f6..0254fad 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)