diff --git a/src/Umbraco.Web/umbraco.presentation/requestHandler.cs b/src/Umbraco.Web/umbraco.presentation/requestHandler.cs index 00655e6ac8..af13b54297 100644 --- a/src/Umbraco.Web/umbraco.presentation/requestHandler.cs +++ b/src/Umbraco.Web/umbraco.presentation/requestHandler.cs @@ -371,21 +371,23 @@ namespace umbraco { // Check access HttpContext.Current.Trace.Write("umbracoRequestHandler", "Access checking started"); if (currentPage != null) { - if ( - Access.IsProtected(int.Parse(currentPage.Attributes.GetNamedItem("id").Value), - currentPage.Attributes.GetNamedItem("path").Value)) { + int id = int.Parse(currentPage.Attributes.GetNamedItem("id").Value); + string path = currentPage.Attributes.GetNamedItem("path").Value; + + if (Access.IsProtected(id, path)) { HttpContext.Current.Trace.Write("umbracoRequestHandler", "Page protected"); + var user = System.Web.Security.Membership.GetUser(); - if (System.Web.Security.Membership.GetUser() == null || !library.IsLoggedOn()) { + if (user == null || !library.IsLoggedOn()) { HttpContext.Current.Trace.Write("umbracoRequestHandler", "Not logged in - redirecting to login page..."); - currentPage = umbracoContent.GetElementById(Access.GetLoginPage(currentPage.Attributes.GetNamedItem("path").Value).ToString()); + currentPage = umbracoContent.GetElementById(Access.GetLoginPage(path).ToString()); } else { - if (System.Web.Security.Membership.GetUser() != null && !Access.HasAccces(int.Parse(currentPage.Attributes.GetNamedItem("id").Value), System.Web.Security.Membership.GetUser().ProviderUserKey)) { + if (user != null && !Access.HasAccces(id, user.ProviderUserKey)) { HttpContext.Current.Trace.Write("umbracoRequestHandler", "Member has not access - redirecting to error page..."); - currentPage = content.Instance.XmlContent.GetElementById(Access.GetErrorPage(currentPage.Attributes.GetNamedItem("path").Value).ToString()); + currentPage = content.Instance.XmlContent.GetElementById(Access.GetErrorPage(path).ToString()); } } } else diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/insertTable.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/insertTable.aspx index a00c055e93..3943cae364 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/insertTable.aspx +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/insertTable.aspx @@ -284,7 +284,7 @@ function insertTable()   - ')) window.close();" value="<%=umbraco.ui.Text("cancel")%>">   + ')) window.close();" value="<%=umbraco.ui.Text("cancel")%>">   "> diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/insertTable.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/insertTable.aspx.designer.cs index 8441a41c3c..240ec98f6f 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/insertTable.aspx.designer.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/insertTable.aspx.designer.cs @@ -1,22 +1,15 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.312 // // Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// the code is regenerated. // //------------------------------------------------------------------------------ namespace umbraco.dialogs { - /// - /// insertTable class. - /// - /// - /// Auto-generated class. - /// public partial class insertTable { /// diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/publish.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/publish.aspx index bf1cbc2ce9..b402e89381 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/publish.aspx +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/publish.aspx @@ -20,7 +20,7 @@ } function showPublication() { - var statusStr = '<%=umbraco.ui.Text("inProgressCounter")%>'; + var statusStr = '<%=umbraco.ui.Text("inProgressCounter").Replace("'", "\\'")%>'; document.getElementById("counter").innerHTML = statusStr.replace('%0%', '0').replace('%1%', pubTotal); document.getElementById('formDiv').style.display = 'none'; document.getElementById('animDiv').style.display = 'block'; @@ -37,7 +37,7 @@ } function updatePublicationDo(retVal) { - var statusStr = '<%=umbraco.ui.Text("inProgressCounter")%>'; + var statusStr = '<%=umbraco.ui.Text("inProgressCounter").Replace("'", "\\'")%>'; document.getElementById("counter").innerHTML = statusStr.replace('%0%', retVal).replace('%1%', pubTotal); setTimeout("updatePublication()", 200); } diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/publish.aspx.designer.cs b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/publish.aspx.designer.cs index d128614b83..d9ebc3eefe 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/publish.aspx.designer.cs +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/publish.aspx.designer.cs @@ -1,10 +1,9 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Runtime Version:2.0.50727.4200 // // Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// the code is regenerated. // //------------------------------------------------------------------------------ diff --git a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/sort.aspx b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/sort.aspx index a2e281c90d..824634ee67 100644 --- a/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/sort.aspx +++ b/src/Umbraco.Web/umbraco.presentation/umbraco/dialogs/sort.aspx @@ -83,7 +83,7 @@

- + " /> or <%=umbraco.ui.Text("general", "cancel", this.getUser())%>