Problem/Motivation
We have a category in our DAM called "IF/THEN Collection" and since it has been created we see errors for requests to /acquia-dam/categories?category=IF%2FTHEN%20Collection while browsing the DAM in our site's media library that look like:
Client error: `GET
https://api.widencollective.com/v2/categories/IF/THEN%20Collection` resulted
in a `401 Unauthorized` response:
{
"error": true,
"response_code": 401,
"error_message": "Unauthorized",
"stack_trace": null
}
All the other categories are working fine, so I suspect the handling of the slash in the category name is the culprit. Quoting Widen API documentation:
“Slashes in category names must be escaped with a preceeding backslash (%5C%2F).”
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 3491071-4_reproduced-on-1.1.x.png | 38.45 KB | baluertl |
Issue fork acquia_dam-3491071
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
cyu commentedComment #3
japerryPushing this to the top to verify before we make the 1.1 release.
Comment #4
baluertlWhile I was working on other things, I just stumbled upon the same on the latest
1.1.x-devversion as well:Memo: whoever will work on this, please make sure that all other non-URL-friendly characters are also tested for, not only the forward slash. Thanks!
Comment #5
baluertlComment #6
deepakkm commentedComment #9
ankitv18 commentedAdd a comment on the MR, please check.
Comment #11
japerryThat data shouldn't be getting passed raw, so I think encoding the return is the right thing here. Fixed!