Skip to content

Commit 192fc14

Browse files
yangineerjordansissel
authored andcommitted
Fix broken jdbc_pass_word_filepath
Fixes #217
1 parent 498ce50 commit 192fc14

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/logstash/inputs/jdbc.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ def register
232232
raise(LogStash::ConfigurationError, "Only one of :jdbc_password, :jdbc_password_filepath may be set at a time.")
233233
end
234234

235-
@jdbc_password = File.read(@jdbc_password_filepath).strip if @jdbc_password_filepath
235+
@jdbc_password = LogStash::Util::Password.new(File.read(@jdbc_password_filepath).strip) if @jdbc_password_filepath
236236

237237
if enable_encoding?
238238
@converters = {}

spec/inputs/jdbc_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@
117117
end
118118

119119
it "should read in jdbc_password from file" do
120-
expect(plugin.jdbc_password).to eq(jdbc_password)
120+
expect(plugin.jdbc_password.value).to eq(jdbc_password)
121121
end
122122
end
123123

0 commit comments

Comments
 (0)