Fixed allow list for query parameter in list method

This commit is contained in:
Luca Frosini 2019-10-04 14:42:44 +02:00
parent 707993872b
commit f96e9e3d41
1 changed files with 4 additions and 3 deletions

View File

@ -297,8 +297,9 @@ public class CKANPackage extends CKAN {
}
}
protected static String[] allowedFilters = new String[] {"q", "fq", "fq_list", "sort", "facet", "facet.mincount",
"facet.limit", "facet.field", "include_drafts", "include_private", "ext_bbox", "fl"};
protected static String[] allowedListQueryParameters = new String[] {"q", "fq", "fq_list", "sort",
/* "facet", "facet.mincount", "facet.limit", "facet.field", */
"include_drafts", "include_private", "ext_bbox"};
protected Map<String,String> checkListParameters(MultivaluedMap<String,String> queryParameters,
Map<String,String> parameters) {
@ -335,7 +336,7 @@ public class CKANPackage extends CKAN {
// q=organization:nextnext
}
for(String key : allowedFilters) {
for(String key : allowedListQueryParameters) {
if(queryParameters.containsKey(key)) {
parameters.put(key, queryParameters.getFirst(key));
}