Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect/missing URL encoding #46

Open
BigMo opened this issue Dec 23, 2020 · 1 comment
Open

Incorrect/missing URL encoding #46

BigMo opened this issue Dec 23, 2020 · 1 comment
Labels
bug Something isn't working Security Security relevant

Comments

@BigMo
Copy link

BigMo commented Dec 23, 2020

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
Copy link
Owner

hobigo commented Dec 23, 2020

Thanks for sending the error.

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

  • encode url in httpClient only
  • add tests with umlauts, #, ?,&,=

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

@hobigo hobigo added bug Something isn't working Security Security relevant labels Dec 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Security Security relevant
Projects
None yet
Development

No branches or pull requests

2 participants