Skip to content

Escape parameters before using in URL #13

@dimitrystd

Description

@dimitrystd

I noticed following line in sdkUpdateEmailEditableSection.java

    public String getPath() {
        return "/asset/v1/email/" + emailId + "/content/" + contentItem.getHtmlId() + ".json";
    }

If user will create email section with name like edit !"text" i will generate wrong request URL.

DoD:

  • URL encode htmlId before using in URL
  • Find and fix similar places in SDK

Note:
I tested marketo and it allows such urls!

/rest/asset/v1/email/2225/content/edit !"text".json

But it also accepts valid url

/asset/v1/email/2225/content/edit%20!%22text%22.json

I could not find a solution for case edit/text. I tried to escape it edit%2Ftext and double escape edit%252Ftext but didn't help :(

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions