U4-2686 - Error when trying to delete member group with ampersand in name.

Created by Tom Jenks 21 Aug 2013, 10:12:23 Updated by Sebastiaan Janssen 26 Aug 2013, 08:31:01

Hi guys, I know this isn't a major bug, but it's the first real one I've found, so hopefully this is the right thing to do..

If you try to delete a member group that has an ampersand in it's name, it will fail.

You can edit and save no problem, and if you remove the ampersand, save, and then delete it works great.

I'm not sure how many versions this affects, but it's definitely a problem in 6.1.2 and 6.1.3

I think I've traced it down to this bit of code in legacyAjaxCalls.asmx.cs:

public void Delete(string nodeId, string alias, string nodeType) { AuthorizeRequest(true);

        //check which parameters to pass depending on the types passed in
        int intNodeID;
        if (nodeType == "memberGroup")
        {
            presentation.create.dialogHandler_temp.Delete(nodeType, 0, alias);
        }
        else if (int.TryParse(nodeId, out intNodeID) && nodeType != "member") // Fix for #26965 - numeric member login gets parsed as nodeId
        {
            presentation.create.dialogHandler_temp.Delete(nodeType, intNodeID, alias);
        }
        else
        {
            presentation.create.dialogHandler_temp.Delete(nodeType, 0, nodeId);
        }
    }{code}

The member group node type is using the alias to delete the node, but the JSON being sent to the method looks like this:

{"nodeId":"test & test","alias":"test & test","nodeType":"memberGroup"}

the ampersand in the alias has been encoded and so i guess it can't find the member group and so will fail.

Hope this helps :)

Comments

Sebastiaan Janssen 26 Aug 2013, 08:30:38

Thanks! Fixed in revision dd5903836925331a1265c2cc0b2c84ff4d612bcd


Priority: Normal

Type: Bug

State: Fixed

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions:

Due in version: 6.2.0

Sprint:

Story Points:

Cycle: