add proper URL escaping to queries of the REST client

Issue #1796 resolved
Robert Jäschke created an issue

It seems that /all/ queries of the REST client forget to properly encode parameters that are inserted into URLs, e.g., GetPostDocumentQuery does

this.performFileDownload(URL_USERS + "/" + this.document.getUserName() + "/posts/" + this.resourceHash + "/documents/" + this.document.getFileName(), this.document.getFile());

instead of

this.performFileDownload(URL_USERS + "/" + URLEncoder.encode(this.document.getUserName(), "UTF-8") + "/posts/" + this.resourceHash + "/documents/" + URLEncoder.encode(this.document.getFileName(), "UTF-8"), this.document.getFile());

This should be fixed (and documented via JUnit-Tests) for ALL queries of the REST-Client.

Comments (8)

  1. Former user Account Deleted

    why (or where?) is it still there? this should be fixed about a month ago by using UrlBuilder.

  2. Log in to comment