Skip to content

Commit

Permalink
Avoid modifying possibly frozen string literal
Browse files Browse the repository at this point in the history
  • Loading branch information
smortex committed Jun 27, 2023
1 parent 132496b commit d1d7843
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/puppet_x/voxpupuli/splunk/util.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ def self.decrypt(secrets_file, value)
return value unless value.start_with?('$7$')

Puppet.debug "Decrypting splunk >= 7.2 data using secret from #{secrets_file}"
value.slice!(0, 3)
data = Base64.strict_decode64(value)
data = Base64.strict_decode64(value[3..-1])
splunk_secret = File.binread(secrets_file).chomp

iv = data.bytes[0, 16].pack('c*')
Expand Down

0 comments on commit d1d7843

Please sign in to comment.