diff --git a/DIST/RestServices_mx7_5.0.1.mpk b/DIST/RestServices_mx7_5.0.1.mpk new file mode 100644 index 0000000..af177ca Binary files /dev/null and b/DIST/RestServices_mx7_5.0.1.mpk differ diff --git a/RestServices.mpr b/RestServices.mpr index 4f00ae2..5b59399 100644 Binary files a/RestServices.mpr and b/RestServices.mpr differ diff --git a/javasource/restservices/RestServices.java b/javasource/restservices/RestServices.java index b2fc030..fcdc60d 100644 --- a/javasource/restservices/RestServices.java +++ b/javasource/restservices/RestServices.java @@ -20,7 +20,7 @@ public class RestServices { /** * Version of the RestServices module */ - public static final String VERSION = "5.0.0"; + public static final String VERSION = "5.0.1"; /** * Amount of objects that are processed by the module at the same time. diff --git a/javasource/restservices/util/Utils.java b/javasource/restservices/util/Utils.java index 90ee823..d299cd5 100644 --- a/javasource/restservices/util/Utils.java +++ b/javasource/restservices/util/Utils.java @@ -27,6 +27,8 @@ import com.mendix.systemwideinterfaces.core.meta.IMetaPrimitive; import com.mendix.systemwideinterfaces.core.meta.IMetaPrimitive.PrimitiveType; +import org.owasp.encoder.Encode; + public class Utils { public static String getShortMemberName(String memberName) { @@ -177,9 +179,10 @@ public static String removeLeadingAndTrailingSlash(String relativeUrl) { public static String nullToEmpty(String statusText) { return statusText == null ? "" : statusText; } - + public static String getRequestUrl(HttpServletRequest request) { - return request.getRequestURL().toString() + (Utils.isEmpty(request.getQueryString()) ? "" : "?" + request.getQueryString()); + String queryString = Encode.forUriComponent(request.getQueryString()); + return request.getRequestURL().toString() + (Utils.isEmpty(queryString) ? "" : "?" + queryString); } public static boolean isSystemAttribute(String key) { diff --git a/userlib/encoder-1.2.1.jar b/userlib/encoder-1.2.1.jar new file mode 100644 index 0000000..f0404c8 Binary files /dev/null and b/userlib/encoder-1.2.1.jar differ diff --git a/userlib/encoder-1.2.1.jar.RestServices.RequiredLib b/userlib/encoder-1.2.1.jar.RestServices.RequiredLib new file mode 100644 index 0000000..e69de29