invite: encode url data before posting it. closes #1285
This commit is contained in:
parent
e07570335d
commit
c4ccaaef68
|
@ -52,6 +52,7 @@
|
||||||
<Reference Include="MonoMac">
|
<Reference Include="MonoMac">
|
||||||
<HintPath>..\..\..\monomac\src\MonoMac.dll</HintPath>
|
<HintPath>..\..\..\monomac\src\MonoMac.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="System.Web" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="AppDelegate.cs">
|
<Compile Include="AppDelegate.cs">
|
||||||
|
|
|
@ -19,6 +19,7 @@ using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Web;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
|
|
||||||
using SparkleLib;
|
using SparkleLib;
|
||||||
|
@ -65,7 +66,7 @@ namespace SparkleShare {
|
||||||
if (string.IsNullOrEmpty (AcceptUrl))
|
if (string.IsNullOrEmpty (AcceptUrl))
|
||||||
return true;
|
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);
|
byte [] post_bytes = Encoding.UTF8.GetBytes (post_data);
|
||||||
|
|
||||||
WebRequest request = WebRequest.Create (AcceptUrl);
|
WebRequest request = WebRequest.Create (AcceptUrl);
|
||||||
|
|
Loading…
Reference in a new issue