I have implemented custom Membership, Profile and Role providers for our environment and they appear to be working correctly.
I'm using Umbraco 4.7.0 and although I understand 4.7.1.1 is now out I'm unsure whether this has been resolved in the updated version. (I admit I haven't tested it but I was wondering is someone had this issue already)
The issue I face is when I change the "Public Access" for a node to use a custom role from the Role Provider and the role name contains a single quote (for example, "All Mazzucchelli's ACT") I get the following exception:
Exception information: Exception type: XPathException Exception message: './group [@id='All Mazzucchelli's ACT']' has an invalid token. at MS.Internal.Xml.XPath.XPathParser.CheckToken(LexKind t) at MS.Internal.Xml.XPath.XPathParser.ParsePredicate(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseStep(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseRelativeLocationPath(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseRelativeLocationPath(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseLocationPath(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParsePathExpr(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseUnionExpr(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseUnaryExpr(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseMultiplicativeExpr(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseAdditiveExpr(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseRelationalExpr(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseEqualityExpr(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseAndExpr(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseOrExpr(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseXPathExpresion(String xpathExpresion) at System.Xml.XPath.XPathExpression.Compile(String xpath, IXmlNamespaceResolver nsResolver) at System.Xml.XPath.XPathNavigator.Select(String xpath) at System.Xml.XmlNode.SelectNodes(String xpath) at System.Xml.XmlNode.SelectSingleNode(String xpath) at umbraco.cms.businesslogic.web.Access.IsProtectedByMembershipRole(Int32 documentId, String role) at umbraco.presentation.umbraco.dialogs.protectPage.Page_Load(Object sender, EventArgs e) at System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) at System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) at System.EventHandler.Invoke(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at umbraco.BasePages.BasePage.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
It's obvious that the single quote has not been escaped.
Do I need to provide the escaped name (which is coming from active directory and is unable to be changed) or is this internal?
Just an update, I upgraded to 4.7.1.1 and the issue still remains. The error is:
Exception information: Exception type: XPathException Exception message: 'group [@id = 'All Mazzucchelli's ACT']' has an invalid token. at MS.Internal.Xml.XPath.XPathParser.CheckToken(LexKind t) at MS.Internal.Xml.XPath.XPathParser.ParsePredicate(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseStep(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseRelativeLocationPath(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseLocationPath(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParsePathExpr(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseUnionExpr(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseUnaryExpr(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseMultiplicativeExpr(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseAdditiveExpr(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseRelationalExpr(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseEqualityExpr(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseAndExpr(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseOrExpr(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseXPathExpresion(String xpathExpresion) at System.Xml.XPath.XPathExpression.Compile(String xpath, IXmlNamespaceResolver nsResolver) at System.Xml.XPath.XPathNavigator.Select(String xpath) at System.Xml.XmlNode.SelectNodes(String xpath) at System.Xml.XmlNode.SelectSingleNode(String xpath) at umbraco.cms.businesslogic.web.Access.RemoveMembershipRoleFromDocument(Int32 documentId, String role) at umbraco.presentation.umbraco.dialogs.protectPage.protect_Click(Object sender, CommandEventArgs e) at System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Thread information: Thread ID: 11 Thread account name: NT AUTHORITY\NETWORK SERVICE Is impersonating: False Stack trace: at MS.Internal.Xml.XPath.XPathParser.CheckToken(LexKind t) at MS.Internal.Xml.XPath.XPathParser.ParsePredicate(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseStep(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseRelativeLocationPath(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseLocationPath(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParsePathExpr(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseUnionExpr(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseUnaryExpr(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseMultiplicativeExpr(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseAdditiveExpr(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseRelationalExpr(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseEqualityExpr(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseAndExpr(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseOrExpr(AstNode qyInput) at MS.Internal.Xml.XPath.XPathParser.ParseXPathExpresion(String xpathExpresion) at System.Xml.XPath.XPathExpression.Compile(String xpath, IXmlNamespaceResolver nsResolver) at System.Xml.XPath.XPathNavigator.Select(String xpath) at System.Xml.XmlNode.SelectNodes(String xpath) at System.Xml.XmlNode.SelectSingleNode(String xpath) at umbraco.cms.businesslogic.web.Access.RemoveMembershipRoleFromDocument(Int32 documentId, String role) at umbraco.presentation.umbraco.dialogs.protectPage.protect_Click(Object sender, CommandEventArgs e) at System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) at System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) at System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) at System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Single Quote in Role Name
Hi everyone.
I have implemented custom Membership, Profile and Role providers for our environment and they appear to be working correctly.
I'm using Umbraco 4.7.0 and although I understand 4.7.1.1 is now out I'm unsure whether this has been resolved in the updated version. (I admit I haven't tested it but I was wondering is someone had this issue already)
The issue I face is when I change the "Public Access" for a node to use a custom role from the Role Provider and the role name contains a single quote (for example, "All Mazzucchelli's ACT") I get the following exception:
It's obvious that the single quote has not been escaped.
Do I need to provide the escaped name (which is coming from active directory and is unable to be changed) or is this internal?
Thanks in advance for any help you can offer.
All the best,
Tony
Just an update, I upgraded to 4.7.1.1 and the issue still remains. The error is:
is working on a reply...