From 2e903bb09250ace3387d5549b001c88ba4f25b87 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Sun, 1 Oct 2017 17:09:46 +0200 Subject: [PATCH] Conversion to token --- Site/Automation/UploadFileHandler.ashx | 2 +- Site/Controls/v5/Base/FileUpload.ascx | 2 +- Site/Controls/v5/Base/FileUpload.ascx.cs | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Site/Automation/UploadFileHandler.ashx b/Site/Automation/UploadFileHandler.ashx index bc13f0b3..745aef1f 100644 --- a/Site/Automation/UploadFileHandler.ashx +++ b/Site/Automation/UploadFileHandler.ashx @@ -364,7 +364,7 @@ namespace Swarmops.Frontend.Automation JObject data = new JObject(); data["ServerRequest"] = "ConvertPdf"; data["PdfFiles"] = JArray.FromObject(pdfsForConversion.ToArray()); - data["Guid"] = (string) guid; + data["Guid"] = (string) guid.Replace("-", "_"); // convert to token data["PersonId"] = authData.CurrentUser.Identity; data["OrganizationId"] = authData.CurrentOrganization.Identity; socket.Send(data.ToString()); diff --git a/Site/Controls/v5/Base/FileUpload.ascx b/Site/Controls/v5/Base/FileUpload.ascx index 88230ac7..8ca9c00d 100644 --- a/Site/Controls/v5/Base/FileUpload.ascx +++ b/Site/Controls/v5/Base/FileUpload.ascx @@ -85,7 +85,7 @@ }); - function progressUpdateCallback_<%=this.GuidString%>(progress) { + function progressUpdateCallback_<%=this.GuidToken%>(progress) { $("#<%=this.ClientID %>_DivProgressPdfConvert .progressbar-value").animate( { diff --git a/Site/Controls/v5/Base/FileUpload.ascx.cs b/Site/Controls/v5/Base/FileUpload.ascx.cs index e13c50c1..4d1db30a 100644 --- a/Site/Controls/v5/Base/FileUpload.ascx.cs +++ b/Site/Controls/v5/Base/FileUpload.ascx.cs @@ -38,6 +38,11 @@ namespace Swarmops.Controls.Base public string ClientUploadStartedCallback { get; set; } public string Cookie { get; set; } + public string GuidToken + { + get { return GuidString.Replace("-", "_"); } + } + protected void Page_Init (object sender, EventArgs e) { // cause master to include necessary script