From 8c2e7cfe41316c6a106c4664ec576af7ab891d7b Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Thu, 12 Jan 2017 20:49:34 +0100 Subject: [PATCH] Removed very dead code --- Site/Security/Login-Old.aspx | 53 ------------ Site/Security/Login-Old.aspx.cs | 106 ----------------------- Site/Security/Login-Old.aspx.designer.cs | 87 ------------------- Site/Site.csproj | 8 -- 4 files changed, 254 deletions(-) delete mode 100644 Site/Security/Login-Old.aspx delete mode 100644 Site/Security/Login-Old.aspx.cs delete mode 100644 Site/Security/Login-Old.aspx.designer.cs diff --git a/Site/Security/Login-Old.aspx b/Site/Security/Login-Old.aspx deleted file mode 100644 index 1c8de87e..00000000 --- a/Site/Security/Login-Old.aspx +++ /dev/null @@ -1,53 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" EnableViewState="true" Inherits="Swarmops.Pages.Security.LoginOld" Codebehind="Login-Old.aspx.cs" %> - - - - - - - - - Swarmops Alpha - Login - - - -
-
 
-
- - - - -
-
-
-
unlock icon

PIRATEWEB5β LOGIN

-
-
- -
-  
-  
-
-

-
-
-  
-  
-
-
-
-
-
-
-
- -
- - diff --git a/Site/Security/Login-Old.aspx.cs b/Site/Security/Login-Old.aspx.cs deleted file mode 100644 index 5ca5f52e..00000000 --- a/Site/Security/Login-Old.aspx.cs +++ /dev/null @@ -1,106 +0,0 @@ -using System; -using System.Diagnostics; -using System.Threading; -using System.Web; -using System.Web.Security; -using System.Web.UI; -using Swarmops.Basic.Types; -using Swarmops.Basic.Types.Swarm; -using Swarmops.Interface.Support; -using Swarmops.Logic.Security; -using Swarmops.Logic.Support; -using Swarmops.Logic.Swarm; - -namespace Swarmops.Pages.Security -{ - public partial class LoginOld : Page - { - protected void Page_Load (object sender, EventArgs e) - { - // Check if this is the first run ever. If so, redirect to Init. - - if (!SupportFunctions.DatabaseConfigured) - { - Response.Redirect ("/Pages/v5/Init/", true); - return; - } - - // If this is the Dev Sandbox, autologin - - if (Request.Url.Host == "dev.swarmops.com" && - PilotInstallationIds.IsPilot (PilotInstallationIds.DevelopmentSandbox)) - { - DashboardMessage.Set ("

You have been logged on as Sandbox Administrator to the Swarmops Development Sandbox.


This machine runs the latest development build, so you may run into diagnostic code and half-finished features. All data here is bogus test data and is reset every night.


In other words, welcome, and play away!



"); - FormsAuthentication.RedirectFromLoginPage ("1,1", true); - } - - - // THE DAMN BITID NEEDS TO GO INTO ANDROID WALLET SO WE CAN STREAMLINE AND REWRITE THIS POS - - - this.LabelLoginFailed.Visible = false; - this.TextLogin.Focus(); - - - // Check for SSL and force it - - // Special case for CloudFlare deployments - there is a case where somebody will get their connections de-SSLed at the server - - string cloudFlareVisitorScheme = Request.Headers["CF-Visitor"]; - bool cloudFlareSsl = false; - - if (!string.IsNullOrEmpty (cloudFlareVisitorScheme)) - { - if (cloudFlareVisitorScheme.Contains ("\"scheme\":\"https\"")) - { - cloudFlareSsl = true; - } - } - - // TODO: Same thing for Pound deployments - - // Rewrite if applicable - - if (Request.Url.ToString().StartsWith ("http://") && !cloudFlareSsl) - // only check client-side as many server sites de-SSL the connection before reaching the web server - { - if (!Request.Url.ToString().StartsWith ("http://dev.swarmops.com/") && - !Request.Url.ToString().StartsWith ("http://localhost:") && - !Request.Url.ToString().StartsWith ("http://swarmops-")) - { - Response.Redirect (Request.Url.ToString().Replace ("http:", "https:")); - } - } - } - - protected void ButtonLogin_Click (object sender, EventArgs e) - { - string loginToken = this.TextLogin.Text; - string password = this.TextPassword.Text; - - if (!string.IsNullOrEmpty (loginToken.Trim()) && !string.IsNullOrEmpty (password.Trim())) - { - try - { - BasicPerson authenticatedPerson = Authentication.Authenticate (loginToken, - password); - Person p = Person.FromIdentity (authenticatedPerson.PersonId); - - if (p.PreferredCulture != Thread.CurrentThread.CurrentCulture.Name) - p.PreferredCulture = Thread.CurrentThread.CurrentCulture.Name; - - // TODO: Determine logged-on organization; possibly ask for clarification - - FormsAuthentication.RedirectFromLoginPage (authenticatedPerson.PersonId + ",1", true); - } - catch (Exception exception) - { - Debug.WriteLine (exception.ToString()); - this.LabelLoginFailed.Text = exception.ToString(); - this.LabelLoginFailed.Visible = true; - this.TextLogin.Focus(); - } - } - } - } -} \ No newline at end of file diff --git a/Site/Security/Login-Old.aspx.designer.cs b/Site/Security/Login-Old.aspx.designer.cs deleted file mode 100644 index 49f04784..00000000 --- a/Site/Security/Login-Old.aspx.designer.cs +++ /dev/null @@ -1,87 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace Swarmops.Pages.Security { - - - public partial class LoginOld { - - /// - /// form1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.HtmlControls.HtmlForm form1; - - /// - /// ScriptManager1 control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.ScriptManager ScriptManager1; - - /// - /// TextLogin control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox TextLogin; - - /// - /// TextPassword control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.TextBox TextPassword; - - /// - /// ButtonLogin control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Button ButtonLogin; - - /// - /// ValidatorRequired_Login control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.RequiredFieldValidator ValidatorRequired_Login; - - /// - /// LabelLoginFailed control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.Label LabelLoginFailed; - - /// - /// ValidatorRequired_Password control. - /// - /// - /// Auto-generated field. - /// To modify move field declaration from designer file to code-behind file. - /// - protected global::System.Web.UI.WebControls.RequiredFieldValidator ValidatorRequired_Password; - } -} diff --git a/Site/Site.csproj b/Site/Site.csproj index be0aa536..c60c2d2c 100644 --- a/Site/Site.csproj +++ b/Site/Site.csproj @@ -565,13 +565,6 @@ FinalizeLogin.aspx - - Login-Old.aspx - ASPXCodeBehind - - - Login-Old.aspx - Login.aspx ASPXCodeBehind @@ -1762,7 +1755,6 @@ -