Improvement to the security to clear any content from the rendering pipeline before redirect

This commit is contained in:
djbadders 2021-02-23 21:27:42 +00:00
parent 06ac2e98e1
commit 3a250132b3
1 changed files with 4 additions and 2 deletions

View File

@ -1,4 +1,5 @@
using System;
using System.Net;
using System;
using Microsoft.AspNetCore.Http;
using Core.Main;
using Core.Helper;
@ -27,7 +28,8 @@ namespace Monitor._Internal
// Security check
if (!IsLoggedIn(this.HttpContext))
{
HttpContext.Response.Redirect(PTMagicConfiguration.GeneralSettings.Monitor.RootUrl + _redirectUrl);
this.HttpContext.Response.Clear();
this.HttpContext.Response.Redirect(PTMagicConfiguration.GeneralSettings.Monitor.RootUrl + _redirectUrl);
}
}