2
src/Umbraco.Web.UI/Umbraco/umbraco.aspx
Normal file
2
src/Umbraco.Web.UI/Umbraco/umbraco.aspx
Normal file
@@ -0,0 +1,2 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="umbraco.aspx.cs" Inherits="Umbraco.Web.UI.Umbraco.umbraco" %>
|
||||
|
||||
19
src/Umbraco.Web.UI/Umbraco/umbraco.aspx.cs
Normal file
19
src/Umbraco.Web.UI/Umbraco/umbraco.aspx.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using Umbraco.Core.Configuration;
|
||||
|
||||
namespace Umbraco.Web.UI.Umbraco
|
||||
{
|
||||
public partial class umbraco : System.Web.UI.Page
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
Response.Status = "301 Moved Permanently";
|
||||
Response.AddHeader("Location", GlobalSettings.Path);
|
||||
}
|
||||
}
|
||||
}
|
||||
15
src/Umbraco.Web.UI/Umbraco/umbraco.aspx.designer.cs
generated
Normal file
15
src/Umbraco.Web.UI/Umbraco/umbraco.aspx.designer.cs
generated
Normal file
@@ -0,0 +1,15 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Umbraco.Web.UI.Umbraco {
|
||||
|
||||
|
||||
public partial class umbraco {
|
||||
}
|
||||
}
|
||||
42
src/Umbraco.Web.UI/umbraco/Logout.aspx
Normal file
42
src/Umbraco.Web.UI/umbraco/Logout.aspx
Normal file
@@ -0,0 +1,42 @@
|
||||
<%@ Page Language="C#" %>
|
||||
<%@ Import Namespace="Umbraco.Core" %>
|
||||
<%@ Import Namespace="Umbraco.Core.IO" %>
|
||||
<%@ Import Namespace="Umbraco.Web" %>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<script runat="server">
|
||||
|
||||
// This page is here purely to deal with legacy logout redirects.
|
||||
protected override void OnInit(EventArgs e)
|
||||
{
|
||||
base.OnInit(e);
|
||||
|
||||
//We need to check the token in the URL to ensure it is correct otherwise malicious GET requests using CSRF attacks
|
||||
// can easily just log the user out.
|
||||
var token = Request["t"];
|
||||
//only perform the logout if the token matches
|
||||
if (token.IsNullOrWhiteSpace() == false && token == UmbracoContext.Current.Security.GetSessionId())
|
||||
{
|
||||
//ensure the person is definitely logged out
|
||||
UmbracoContext.Current.Security.ClearCurrentLogin();
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title>Logout</title>
|
||||
<script type="text/javascript">
|
||||
//if this is not the top window, we'll assume we're in an iframe
|
||||
// so we actually won't do anything. Otherwise if this is the top window
|
||||
// we'll redirect to the login dialog
|
||||
if (window == top) {
|
||||
document.location.href = '<%= IOHelper.ResolveUrl(SystemDirectories.Umbraco).EnsureEndsWith('/') + "#/login" %>';
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user