Skip to content

Commit

Permalink
Issue voxpupuli#179 Fix encryption/decryption of empty eyaml values
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert A. Vincent II (Bob-Vee) committed Jul 29, 2021
1 parent ec3d47b commit 4caf753
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/hiera/backend/eyaml/parser/encrypted_tokens.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def create_enc_token(match, type, enc_comma, cipher, indentation = '')

class EncHieraTokenType < EncTokenType
def initialize
@regex = %r{ENC\[(\w+,)?([a-zA-Z0-9+/ =\n]+?)\]}
@regex = %r{ENC\[(\w+,)?([a-zA-Z0-9+/ =\n]*?)\]}
@string_token_type = EncStringTokenType.new
end

Expand All @@ -119,7 +119,7 @@ def create_token(string)

class EncStringTokenType < EncTokenType
def initialize
@regex = %r{ENC\[(\w+,)?([a-zA-Z0-9+/=]+?)\]}
@regex = %r{ENC\[(\w+,)?([a-zA-Z0-9+/=]*?)\]}
end

def create_token(string)
Expand Down

0 comments on commit 4caf753

Please sign in to comment.