diff --git a/BuildFiles/update-kaylock-count.sh b/BuildFiles/update-kaylock-count.sh index 107bd607..82d95148 100755 --- a/BuildFiles/update-kaylock-count.sh +++ b/BuildFiles/update-kaylock-count.sh @@ -5,4 +5,4 @@ # Update the LOC count on every sprint deploy. -find . \( -name '*.cs' -o -name '*.as?x' \) | xargs wc -l > LINESOFCODE +find . \( -name '*.cs' -o -name '*.as?x' \) | grep -v "External Dep" | xargs wc -l > LINESOFCODE diff --git a/Site5/Security/Login.aspx b/Site5/Security/Login-Old.aspx similarity index 96% rename from Site5/Security/Login.aspx rename to Site5/Security/Login-Old.aspx index 9134f479..8e765370 100644 --- a/Site5/Security/Login.aspx +++ b/Site5/Security/Login-Old.aspx @@ -1,53 +1,53 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login.aspx.cs" EnableViewState="true" Inherits="Swarmops.Pages.Security.Login" %> - - - - - - - - - Swarmops Alpha - Login - - - -
-
 
-
- - - - -
-
-
-
unlock icon

PIRATEWEB5β LOGIN

-
-
- -
-  
-  
-
-

-
-
-  
-  
-
-
-
-
-
-
-
- -
- - +<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login-Old.aspx.cs" EnableViewState="true" Inherits="Swarmops.Pages.Security.LoginOld" %> + + + + + + + + + Swarmops Alpha - Login + + + +
+
 
+
+ + + + +
+
+
+
unlock icon

PIRATEWEB5β LOGIN

+
+
+ +
+  
+  
+
+

+
+
+  
+  
+
+
+
+
+
+
+
+ +
+ + diff --git a/Site5/Security/Login.aspx.cs b/Site5/Security/Login-Old.aspx.cs similarity index 96% rename from Site5/Security/Login.aspx.cs rename to Site5/Security/Login-Old.aspx.cs index 240e87f0..9bc53ee2 100644 --- a/Site5/Security/Login.aspx.cs +++ b/Site5/Security/Login-Old.aspx.cs @@ -1,99 +1,99 @@ -using System; -using System.Threading; -using System.Web; -using System.Web.Security; -using Swarmops.Basic.Types; -using Swarmops.Database; -using Swarmops.Logic.Support; -using Swarmops.Logic.Swarm; - -namespace Swarmops.Pages.Security -{ - public partial class Login : System.Web.UI.Page - { - protected void Page_Load(object sender, EventArgs e) - { - // Check if this is the first run ever. If so, redirect to Init. - - if (!SwarmDb.Configuration.IsConfigured()) - { - 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)) - { - Response.AppendCookie(new HttpCookie("DashboardMessage", HttpUtility.UrlEncode("

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 = Swarmops.Logic.Security.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.ToString() + ",1", true); - } - catch (Exception exception) - { - System.Diagnostics.Debug.WriteLine(exception.ToString()); - this.LabelLoginFailed.Text = exception.ToString(); - this.LabelLoginFailed.Visible = true; - this.TextLogin.Focus(); - - } - } - } - } -} +using System; +using System.Threading; +using System.Web; +using System.Web.Security; +using Swarmops.Basic.Types; +using Swarmops.Database; +using Swarmops.Logic.Support; +using Swarmops.Logic.Swarm; + +namespace Swarmops.Pages.Security +{ + public partial class LoginOld : System.Web.UI.Page + { + protected void Page_Load(object sender, EventArgs e) + { + // Check if this is the first run ever. If so, redirect to Init. + + if (!SwarmDb.Configuration.IsConfigured()) + { + 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)) + { + Response.AppendCookie(new HttpCookie("DashboardMessage", HttpUtility.UrlEncode("

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 = Swarmops.Logic.Security.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.ToString() + ",1", true); + } + catch (Exception exception) + { + System.Diagnostics.Debug.WriteLine(exception.ToString()); + this.LabelLoginFailed.Text = exception.ToString(); + this.LabelLoginFailed.Visible = true; + this.TextLogin.Focus(); + + } + } + } + } +}