From 9f7add68d57072f97891106e713b279feab8a0d0 Mon Sep 17 00:00:00 2001 From: Matt Ward Date: Mon, 19 Nov 2012 20:38:09 +0000 Subject: [PATCH] Encode password characters on translation server post. Passwords with non-alphanumeric characters were rejected because they were not encoded in the http post body. --- src/Tools/StringResourceTool/StringResourceTool.csproj | 1 + src/Tools/StringResourceTool/TranslationServer.cs | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Tools/StringResourceTool/StringResourceTool.csproj b/src/Tools/StringResourceTool/StringResourceTool.csproj index 6d0669b32b..fe6030ea0e 100644 --- a/src/Tools/StringResourceTool/StringResourceTool.csproj +++ b/src/Tools/StringResourceTool/StringResourceTool.csproj @@ -44,6 +44,7 @@ + diff --git a/src/Tools/StringResourceTool/TranslationServer.cs b/src/Tools/StringResourceTool/TranslationServer.cs index 455ed4adb2..664931ad25 100644 --- a/src/Tools/StringResourceTool/TranslationServer.cs +++ b/src/Tools/StringResourceTool/TranslationServer.cs @@ -8,6 +8,7 @@ using System; using System.IO; using System.Net; +using System.Web; using System.Windows.Forms; namespace StringResourceTool @@ -28,7 +29,7 @@ namespace StringResourceTool System.Threading.Thread.Sleep(50); HttpWebRequest request = (HttpWebRequest)WebRequest.Create(baseURL + "logon.asp"); request.ContentType = "application/x-www-form-urlencoded"; - string postString = "uname=" + user + "&upwd=" + pwd; + string postString = "uname=" + user + "&upwd=" + HttpUtility.UrlEncode(pwd); request.ContentLength = postString.Length; request.CookieContainer = cookieContainer; request.Method = "POST";