mirror of
https://github.com/inspec/inspec
synced 2024-11-23 13:13:22 +00:00
Changing oracle_session back to using escaped query.
Signed-off-by: Nolan Davidson <ndavidson@chef.io>
This commit is contained in:
parent
9cd69ce4af
commit
57731e1e50
1 changed files with 2 additions and 2 deletions
|
@ -23,7 +23,7 @@ module Inspec::Resources
|
|||
def query(q)
|
||||
escaped_query = q.gsub(/\\/, '\\\\').gsub(/"/, '\\"').gsub(/\$/, '\\$')
|
||||
|
||||
cmd = inspec.command("echo \"#{q}\" | sqlplus -s #{@user}/#{@pass}@localhost/#{@service}")
|
||||
cmd = inspec.command("echo \"#{escaped_query}\" | sqlplus -s #{@user}/#{@pass}@localhost/#{@service}")
|
||||
out = cmd.stdout + "\n" + cmd.stderr
|
||||
if out.downcase =~ /^error/
|
||||
skip_resource("Can't connect to Oracle instance for SQL checks.")
|
||||
|
|
Loading…
Reference in a new issue