setup: Allow spaces in the middle of passwords. closes #1278

This commit is contained in:
Hylke Bons 2013-05-21 19:17:10 +01:00
parent 56e8857678
commit f6be604ed3

View file

@ -397,7 +397,6 @@ namespace SparkleShare {
try { try {
string address = remote_url.Replace (uri.AbsolutePath, ""); string address = remote_url.Replace (uri.AbsolutePath, "");
new_plugin = SparklePlugin.Create (uri.Host, address, address, "", "", "/path/to/project"); new_plugin = SparklePlugin.Create (uri.Host, address, address, "", "", "/path/to/project");
if (new_plugin != null) { if (new_plugin != null) {
@ -524,15 +523,15 @@ namespace SparkleShare {
public void CheckCryptoSetupPage (string password) public void CheckCryptoSetupPage (string password)
{ {
bool valid_password = (password.Length > 0 && !password.Contains (" ")); bool is_valid_password = (password.Length > 0 && !password.StartsWith (" ") && !password.EndsWith (" "));
UpdateCryptoSetupContinueButtonEvent (valid_password); UpdateCryptoSetupContinueButtonEvent (is_valid_password);
} }
public void CheckCryptoPasswordPage (string password) public void CheckCryptoPasswordPage (string password)
{ {
bool password_correct = Program.Controller.CheckPassword (password); bool is_password_correct = Program.Controller.CheckPassword (password);
UpdateCryptoPasswordContinueButtonEvent (password_correct); UpdateCryptoPasswordContinueButtonEvent (is_password_correct);
} }