Skip to content

Commit

Permalink
do not trim promt result, messes with passwords
Browse files Browse the repository at this point in the history
  • Loading branch information
shutdown256 committed Dec 7, 2023
1 parent 6c3f33e commit 3ed2002
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ public class PromptBuilder : IAlertDialogBuilder<PromptConfig>
.SetTitle(config.Title)
//.SetView(txt)
.SetPositiveButton(config.OkText, (s, a) =>
config.OnAction(new PromptResult(true, txt.Text?.Trim()))
config.OnAction(new PromptResult(true, txt.Text)) // DO NOT TRIM RESULT
);

if (config.IsCancellable)
{
builder.SetNegativeButton(config.CancelText, (s, a) =>
config.OnAction(new PromptResult(false, txt.Text?.Trim()))
config.OnAction(new PromptResult(false, txt.Text)) // DO NOT TRIM RESULT
);
}
var dialog = builder.Create();
Expand Down Expand Up @@ -123,13 +123,13 @@ public Dialog Build(AppCompatActivity activity, PromptConfig config)
.SetTitle(config.Title)
//.SetView(txt)
.SetPositiveButton(config.OkText, (s, a) =>
config.OnAction(new PromptResult(true, txt.Text?.Trim()))
config.OnAction(new PromptResult(true, txt.Text)) // DO NOT TRIM RESULT
);

if (config.IsCancellable)
{
builder.SetNegativeButton(config.CancelText, (s, a) =>
config.OnAction(new PromptResult(false, txt.Text?.Trim()))
config.OnAction(new PromptResult(false, txt.Text)) // DO NOT TRIM RESULT
);
}
var dialog = builder.Create();
Expand Down

0 comments on commit 3ed2002

Please sign in to comment.