Skip to content

Commit

Permalink
Add regex for dialog password fields.
Browse files Browse the repository at this point in the history
  • Loading branch information
lfu committed Sep 13, 2018
1 parent 9f3c401 commit 2247c8a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/miq_request_workflow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def self.encrypted_options_fields
end

def self.encrypted_options_field_regs
encrypted_options_fields.map { |f| /\[:#{f}\]/ }
encrypted_options_fields.map { |f| /\[:#{f}\]/ } + [/password::/]
end

def self.all_encrypted_options_fields
Expand Down
6 changes: 6 additions & 0 deletions spec/models/miq_request_workflow_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -638,4 +638,10 @@
expect(workflow.storage_to_hash_struct(storage).storage_clusters).to be_nil
end
end

context '.encrypted_options_field_regs' do
it 'includes "password::"' do
expect(MiqRequestWorkflow.encrypted_options_field_regs).to include(/password::/)
end
end
end

0 comments on commit 2247c8a

Please sign in to comment.