REST API Search

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

REST API Search

Henry Versemann

I’m trying to do a REST API search using a raw department name value of “English/Literature” and after urlencoding it, it looks like this “English%2FLiterature”.

 

The search request is failing with a status code 400 – Bad Request, which I’m guessing is because of the forward-slash being part of the search value, while its also part of a normal url value.

 

I’ve also both urlencoding and escaping at the same time to look like this “English%2F%2F”Literature” instead of “English%2FLiterature”, but it doesn’t work either.

 

So what is the proper way to format a search, string which includes a forward slash, for searching the REST API with?

 

Thanks for the help.

 

Henry

 

 

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/CY4PR0501MB3777C0C6FCBD821AF6F42B32AD5D0%40CY4PR0501MB3777.namprd05.prod.outlook.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: REST API Search

Maarten Daalder
Hi Henry,

You probably need to de-encode the forward /, leaving %2F in a URL will probably trigger the mitigation for CVE-2007-0450.

Or you need to add
-Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true

to your startup environment variables.

On Friday, 3 November 2017 15:52:15 UTC+1, newbie23 wrote:

I’m trying to do a REST API search using a raw department name value of “English/Literature” and after urlencoding it, it looks like this “English%2FLiterature”.

 

The search request is failing with a status code 400 – Bad Request, which I’m guessing is because of the forward-slash being part of the search value, while its also part of a normal url value.

 

I’ve also both urlencoding and escaping at the same time to look like this “English%2F%2F”Literature” instead of “English%2FLiterature”, but it doesn’t work either.

 

So what is the proper way to format a search, string which includes a forward slash, for searching the REST API with?

 

Thanks for the help.

 

Henry

 

 

--
http://dotcms.com - Open Source Java Content Management
---
You received this message because you are subscribed to the Google Groups "dotCMS User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/dotcms/eb5b2785-777f-4ef1-a293-ed6a2c3cbee8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.