hobigo / nextcloud-node-client

Nextcloud node.js client for TypeScript and JavaScript
https://hobigo.github.io/nextcloud-node-client/
Apache License 2.0
58 stars 16 forks source link

Incorrect/missing URL encoding #46

Open BigMo opened 3 years ago

BigMo commented 3 years ago

Describe the bug Methods such as client.getFolderContents fail to generate properly URL encoded requests, resulting in HTTP 500 responses.

To Reproduce Steps to reproduce the behavior:

  1. Create a folder or file containing umlauts (ä, ö, ü...) or certain characters with special meanings in URLs (e.g. '+')
  2. Try to query this folder using methods such as client.getFolderContents

Expected behavior The API is supposed to generate properly encoded URLs for HTTP requests to the nextcloud instance, resulting in appropiate and expected HTTP responses. For client.getFolderContents, a list of folder contents of the specified folder should be returned.

Additional context Pulled this lib directly from NPM, version according to package.json is 1.8.1.

hobigo commented 3 years ago

Thanks for sending the error.

HttpClient.getHttpResponse(...) url is never url encoded

Try to get a create a new version by end of the year