From 3a990f465563f65184845eb0c38d5ac9162c0559 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Tue, 21 May 2013 19:17:10 +0100 Subject: [PATCH] setup: Allow spaces in the middle of passwords. closes #1278 --- SparkleShare/SparkleSetupController.cs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/SparkleShare/SparkleSetupController.cs b/SparkleShare/SparkleSetupController.cs index 5efa60ba..7caa9c2a 100755 --- a/SparkleShare/SparkleSetupController.cs +++ b/SparkleShare/SparkleSetupController.cs @@ -397,7 +397,6 @@ namespace SparkleShare { try { string address = remote_url.Replace (uri.AbsolutePath, ""); - new_plugin = SparklePlugin.Create (uri.Host, address, address, "", "", "/path/to/project"); if (new_plugin != null) { @@ -524,15 +523,15 @@ namespace SparkleShare { public void CheckCryptoSetupPage (string password) { - bool valid_password = (password.Length > 0 && !password.Contains (" ")); - UpdateCryptoSetupContinueButtonEvent (valid_password); + bool is_valid_password = (password.Length > 0 && !password.StartsWith (" ") && !password.EndsWith (" ")); + UpdateCryptoSetupContinueButtonEvent (is_valid_password); } public void CheckCryptoPasswordPage (string password) { - bool password_correct = Program.Controller.CheckPassword (password); - UpdateCryptoPasswordContinueButtonEvent (password_correct); + bool is_password_correct = Program.Controller.CheckPassword (password); + UpdateCryptoPasswordContinueButtonEvent (is_password_correct); }