Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Tony Cooke 4 posts 24 karma points
    Feb 19, 2012 @ 23:59
    Tony Cooke
    0

    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:

    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?

    Thanks in advance for any help you can offer.

    All the best,
    Tony

  • Tony Cooke 4 posts 24 karma points
    Feb 20, 2012 @ 02:44
    Tony Cooke
    0

    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)
     
     
    Request information:
        Request URL: http://portal:8889/umbraco/dialogs/protectPage.aspx?mode=cut&nodeId=2236&rnd=62.1&rndo=65.2
        Request path: /umbraco/dialogs/protectPage.aspx
        User host address: 192.168.1.208
        User: Tony Cooke
        Is authenticated: True
        Authentication Type: Forms
        Thread account name: NT AUTHORITY\NETWORK SERVICE
     
    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)
Please Sign in or register to post replies

Write your reply to:

Draft