1. Patrick Schaller
  2. KeePassTrueCryptMount

Commits

Patrick Schaller  committed c1498fc

PwEntryExtension: If the password contains one or more space sings, the password will be enclosed in quotation marks.
Fix #6

  • Participants
  • Parent commits 4b65936
  • Branches master

Comments (0)

Files changed (1)

File src/KeepassTrueCryptMount/PwEntryExtension.cs

View file
  • Ignore whitespace
                 if (!askForPassword)
                 {
                     arguments.Append(" /p ");
-                    arguments.Append(entry.Strings.GetSafe("Password").ReadString());                    
+                    var pwd = entry.Strings.GetSafe("Password").ReadString();
+                    if (pwd.Contains(" "))
+                    {
+                        arguments.AppendFormat("\"{0}\"", pwd);
+                    }
+                    else
+                    {
+                        arguments.Append(pwd);
+                    }
                 }
             }