From de67786f71ddcc296f8d7f07bb2f31b9bc1097af Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Thu, 16 Aug 2012 09:50:35 +0100 Subject: [PATCH] Don't include the 'username:password' portion of the URL when generating SparkleShare.txt. Closes #907 --- SparkleLib/SparkleFetcherBase.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/SparkleLib/SparkleFetcherBase.cs b/SparkleLib/SparkleFetcherBase.cs index 52154e6e..d6afa7f2 100755 --- a/SparkleLib/SparkleFetcherBase.cs +++ b/SparkleLib/SparkleFetcherBase.cs @@ -200,10 +200,17 @@ namespace SparkleLib { string file_path = Path.Combine (TargetFolder, "SparkleShare.txt"); string n = Environment.NewLine; + UriBuilder uri_builder = new UriBuilder (RemoteUrl); + + if (RemoteUrl.Scheme.StartsWith ("http")) { + uri_builder.UserName = ""; + uri_builder.Password = ""; + } + string text = "Congratulations, you've successfully created a SparkleShare repository!" + n + n + "Any files you add or change in this folder will be automatically synced to " + n + - RemoteUrl + " and everyone connected to it." + n + + uri_builder.ToString () + " and everyone connected to it." + n + n + "SparkleShare is an Open Source software program that helps people " + n + "collaborate and share files. If you like what we do, please consider a small " + n +