Skip to content

Commit

Permalink
handle sensitive inputs for prompts
Browse files Browse the repository at this point in the history
  • Loading branch information
adriana-corui committed Aug 26, 2020
1 parent da61894 commit aab8a44
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,14 @@ private void bindInput(Input input, Map<String, ? extends Value> context,
final Value promptValue = promptContext.get(inputName);

if (nonNull(promptValue)) {
value = promptValue;
Value valueFromContext = context.get(inputName);
boolean sensitive = input.getValue() != null && input.getValue().isSensitive() ||
valueFromContext != null && valueFromContext.isSensitive();
if (!input.isPrivateInput() && sensitive) {
value = ValueFactory.create(promptValue, true);
} else {
value = promptValue;
}
} else {
value = resolveValue(input, context, targetContext, systemProperties);
}
Expand Down

0 comments on commit aab8a44

Please sign in to comment.