From c1b3b5d86f24f1e727399c02cdfeba1a567a284f Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Sat, 5 May 2018 18:31:58 +0200 Subject: [PATCH] Fix for bad cookie --- Logic/Financial/FinancialAccount.cs | 2 +- Site/Master-v5.master.cs | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Logic/Financial/FinancialAccount.cs b/Logic/Financial/FinancialAccount.cs index 007eb8b5..76dcd7f4 100644 --- a/Logic/Financial/FinancialAccount.cs +++ b/Logic/Financial/FinancialAccount.cs @@ -300,7 +300,7 @@ namespace Swarmops.Logic.Financial foreach (FinancialAccountRow row in testRows) { - if (row.Transaction.Description == initialBalanceTransactionTitle) + if (row.Transaction.Description == initialBalanceTransactionTitle && row.FinancialAccountId == this.Identity) { lastFoundRow = row.TransactionRow; } diff --git a/Site/Master-v5.master.cs b/Site/Master-v5.master.cs index 6e3a5a4c..c7dc636f 100644 --- a/Site/Master-v5.master.cs +++ b/Site/Master-v5.master.cs @@ -43,14 +43,19 @@ namespace Swarmops.Frontend // END TEST CODE + // If organization doesn't exist anymore, sign out - if (this._authority.Organization.Identity == 3 && - PilotInstallationIds.IsPilot (PilotInstallationIds.PiratePartySE)) + try + { + this._authority.Organization.GetMemberCount(); // will throw if Organization can't be looked up + } + catch (Exception) { this._authority = null; FormsAuthentication.SignOut(); Response.Redirect("/", true); } + } protected void Page_Load (object sender, EventArgs e)