From 9e858bebb89de05b1c9ecc27f5bd9fbff95a728e Mon Sep 17 00:00:00 2001 From: "Jacob M. Jacob" Date: Mon, 10 Mar 2014 17:25:41 -0500 Subject: [PATCH] Fixes ssh-injection error while using chap authentication A space in the command construction was being caught by the ssh-injection check. The fix is to separate the command strings. Change-Id: If1f719f9c2ceff31ed5386c53cf60bc7f522f4d7 Closes-Bug: #1280409 --- cinder/tests/test_eqlx.py | 2 +- cinder/volume/drivers/eqlx.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cinder/tests/test_eqlx.py b/cinder/tests/test_eqlx.py index 61f9dc32b..ac815e191 100644 --- a/cinder/tests/test_eqlx.py +++ b/cinder/tests/test_eqlx.py @@ -187,7 +187,7 @@ class DellEQLSanISCSIDriverTestCase(test.TestCase): self.driver._eql_execute('volume', 'select', volume['name'], 'access', 'create', 'initiator', self.connector['initiator'], - 'authmethod chap', + 'authmethod', 'chap', 'username', self.configuration.eqlx_chap_login) self.mox.ReplayAll() diff --git a/cinder/volume/drivers/eqlx.py b/cinder/volume/drivers/eqlx.py index b5e7fa4f2..e86c11092 100644 --- a/cinder/volume/drivers/eqlx.py +++ b/cinder/volume/drivers/eqlx.py @@ -392,7 +392,7 @@ class DellEQLSanISCSIDriver(SanISCSIDriver): cmd = ['volume', 'select', volume['name'], 'access', 'create', 'initiator', connector['initiator']] if self.configuration.eqlx_use_chap: - cmd.extend(['authmethod chap', 'username', + cmd.extend(['authmethod', 'chap', 'username', self.configuration.eqlx_chap_login]) self._eql_execute(*cmd) iscsi_properties = self._get_iscsi_properties(volume) -- 2.45.2