Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions dotnet/src/dotnetframework/GxClasses/Middleware/GXHttp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1537,17 +1537,24 @@ protected void SendResponseStatus(HttpStatusCode statusCode)
SendResponseStatus((int)statusCode, string.Empty);
}


#if !NETCORE
protected void SendResponseStatus(int statusCode, string statusDescription)
{
context.HttpContext.Response.StatusCode = statusCode;
#if !NETCORE
if (!string.IsNullOrEmpty(statusDescription))
context.HttpContext.Response.StatusDescription = statusDescription;
#endif
this.setAjaxCallMode();
this.disableOutput();
}

#else
protected override void SendResponseStatus(int statusCode, string statusDescription)
{
context.HttpContext.Response.StatusCode = statusCode;
this.setAjaxCallMode();
this.disableOutput();
}
#endif
private void SendReferer()
{
context.httpAjaxContext.ajax_rsp_assign_hidden("sCallerURL", context.GetReferer());
Expand Down
10 changes: 9 additions & 1 deletion dotnet/src/dotnetframework/GxClasses/Model/GXBaseObject.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
using GeneXus.Diagnostics;
using GeneXus.Encryption;
using GeneXus.Http;
using GeneXus.Utils;
Expand Down Expand Up @@ -142,10 +141,17 @@ private string Encrypt64(string value, string key, bool safeEncoding)
}
catch (InvalidKeyException)
{
context.SetCookie("GX_SESSION_ID", string.Empty, string.Empty, DateTime.MinValue, string.Empty, context.GetHttpSecure());
GXLogging.Error(log, "440 Invalid encryption key");
SendResponseStatus(440, "Session timeout");
}
return sRet;
}
protected virtual void SendResponseStatus(int statusCode, string statusDescription)
{
context.HttpContext.Response.StatusCode = statusCode;
}

protected string UriEncrypt64(string value, string key)
{
return Encrypt64(value, key, true);
Expand All @@ -164,7 +170,9 @@ private string Decrypt64(string value, string key, bool safeEncoding)
}
catch (InvalidKeyException)
{
context.SetCookie("GX_SESSION_ID", string.Empty, string.Empty, DateTime.MinValue, string.Empty, context.GetHttpSecure());
GXLogging.Error(log, "440 Invalid encryption key");
SendResponseStatus(440, "Session timeout");
}
return sRet;
}
Expand Down