Skip to content

Commit

Permalink
always quote user name and password, fixes #158
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-virkus committed Jun 3, 2021
1 parent c1157b5 commit fe56e02
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/imap/imap_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -238,10 +238,8 @@ class ImapClient extends ClientBase {

/// Logs the specified user in with the given [name] and [password].
Future<List<Capability>> login(String name, String password) async {
final quote = name.contains(' ') || password.contains(' ');
final cmd =
Command(quote ? 'LOGIN "$name" "$password"' : 'LOGIN $name $password');
cmd.logText = 'LOGIN $name (password scrambled)';
final cmd = Command('LOGIN "$name" "$password"');
cmd.logText = 'LOGIN "$name" "(password scrambled)"';
final parser = CapabilityParser(serverInfo);
final response = await sendCommand<List<Capability>>(cmd, parser);
isLoggedIn = true;
Expand Down

0 comments on commit fe56e02

Please sign in to comment.