REST API Search

8 views
Skip to first unread message

Henry Versemann

unread,
Nov 3, 2017, 10:52:15 AM11/3/17
to dot...@googlegroups.com

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

 

 

Maarten Daalder

unread,
Nov 6, 2017, 3:25:19 AM11/6/17
to dotCMS User Group
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.
Reply all
Reply to author
Forward
0 new messages