From c4ccaaef681f876be81f5b8db5bc0454546c1493 Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Wed, 15 May 2013 17:16:17 +0100 Subject: [PATCH] invite: encode url data before posting it. closes #1285 --- SparkleShare/Mac/SparkleShare.csproj | 1 + SparkleShare/SparkleInvite.cs | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/SparkleShare/Mac/SparkleShare.csproj b/SparkleShare/Mac/SparkleShare.csproj index ed607078..0b654378 100644 --- a/SparkleShare/Mac/SparkleShare.csproj +++ b/SparkleShare/Mac/SparkleShare.csproj @@ -52,6 +52,7 @@ ..\..\..\monomac\src\MonoMac.dll + diff --git a/SparkleShare/SparkleInvite.cs b/SparkleShare/SparkleInvite.cs index d3feae3d..c3a891c7 100644 --- a/SparkleShare/SparkleInvite.cs +++ b/SparkleShare/SparkleInvite.cs @@ -19,6 +19,7 @@ using System; using System.IO; using System.Net; using System.Text; +using System.Web; using System.Xml; using SparkleLib; @@ -65,7 +66,7 @@ namespace SparkleShare { if (string.IsNullOrEmpty (AcceptUrl)) return true; - string post_data = "public_key=" + public_key; + string post_data = "public_key=" + HttpUtility.UrlEncode (public_key); byte [] post_bytes = Encoding.UTF8.GetBytes (post_data); WebRequest request = WebRequest.Create (AcceptUrl); @@ -113,4 +114,4 @@ namespace SparkleShare { } } } -} +} \ No newline at end of file