From 94e4b91155a61c086c05997b0680679446b7ffbf Mon Sep 17 00:00:00 2001 From: "zaccaria.majid" Date: Tue, 14 Nov 2023 11:51:03 +0100 Subject: [PATCH] fix sicurezza --- MP-TAB-SERV/MP-TAB-SERV.csproj | 2 +- MP-TAB-SERV/Pages/Logout.razor | 4 +- MP-TAB-SERV/Pages/Logout.razor.cs | 47 +++++++++++++++++++++ MP-TAB-SERV/Resources/ChangeLog.html | 2 +- MP-TAB-SERV/Resources/VersNum.txt | 2 +- MP-TAB-SERV/Resources/manifest.xml | 2 +- MP.Data/Services/TabDataService.cs | 62 +++++++++++++++++++++------- 7 files changed, 98 insertions(+), 23 deletions(-) create mode 100644 MP-TAB-SERV/Pages/Logout.razor.cs diff --git a/MP-TAB-SERV/MP-TAB-SERV.csproj b/MP-TAB-SERV/MP-TAB-SERV.csproj index 5f5130e9..654471b0 100644 --- a/MP-TAB-SERV/MP-TAB-SERV.csproj +++ b/MP-TAB-SERV/MP-TAB-SERV.csproj @@ -3,7 +3,7 @@ net6.0 enable - 6.16.2311.1410 + 6.16.2311.1411 enable MP_TAB_SERV diff --git a/MP-TAB-SERV/Pages/Logout.razor b/MP-TAB-SERV/Pages/Logout.razor index a881db05..6579df65 100644 --- a/MP-TAB-SERV/Pages/Logout.razor +++ b/MP-TAB-SERV/Pages/Logout.razor @@ -1,8 +1,6 @@ @page "/logout" -

logout

+ -@code { -} diff --git a/MP-TAB-SERV/Pages/Logout.razor.cs b/MP-TAB-SERV/Pages/Logout.razor.cs new file mode 100644 index 00000000..7d75c64a --- /dev/null +++ b/MP-TAB-SERV/Pages/Logout.razor.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using Microsoft.AspNetCore.Components; +using System.Net.Http; +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Components.Authorization; +using Microsoft.AspNetCore.Components.Forms; +using Microsoft.AspNetCore.Components.Routing; +using Microsoft.AspNetCore.Components.Web; +using Microsoft.AspNetCore.Components.Web.Virtualization; +using Microsoft.JSInterop; +using MP_TAB_SERV; +using MP_TAB_SERV.Shared; +using MP_TAB_SERV.Components; +using MP.Data; +using MP.Data.DatabaseModels; +using MP.Data.DTO; +using MP.Data.Services; +using Newtonsoft.Json; +using NLog; +using EgwCoreLib.Razor; +using Blazored.LocalStorage; + +namespace MP_TAB_SERV.Pages +{ + public partial class Logout + { + [Inject] + protected ILocalStorageService localStorage { get; set; } = null!; + [Inject] + protected TabDataService TDService { get; set; } = null!; + [Inject] + protected MessageService MsgServ { get; set; } = null!; + [Inject] + protected NavigationManager NavMan { get; set; } = null!; + + protected override async Task OnInitializedAsync() + { + await Task.Delay(1); + await localStorage.SetItemAsync("currTkn", ""); + await TDService.OperatoreDeleteRedis(MsgServ.MatrOpr); + NavMan.NavigateTo("regnewdevice"); + } + } +} \ No newline at end of file diff --git a/MP-TAB-SERV/Resources/ChangeLog.html b/MP-TAB-SERV/Resources/ChangeLog.html index 15d31c57..6e880a19 100644 --- a/MP-TAB-SERV/Resources/ChangeLog.html +++ b/MP-TAB-SERV/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

Versione: 6.16.2311.1410

+

Versione: 6.16.2311.1411


Note di rilascio: