Skip to content

Commit

Permalink
fix: Files list loading with special chars in uid
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Ng <[email protected]>
  • Loading branch information
Pytal committed Sep 7, 2023
1 parent 2c400db commit 1335744
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/dav/dav.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@ export const davRemoteURL = generateRemoteUrl('dav')
* @param remoteURL The DAV server remote URL
*/
export const davGetClient = function(remoteURL = davRemoteURL) {
const client = createClient(remoteURL, {
// Encode valid user id characters
const encodedUrl = encodeURI(remoteURL)

Check warning on line 63 in lib/dav/dav.ts

View check run for this annotation

Codecov / codecov/patch

lib/dav/dav.ts#L63

Added line #L63 was not covered by tests
.replaceAll('\'', '%27')
const client = createClient(encodedUrl, {

Check warning on line 65 in lib/dav/dav.ts

View check run for this annotation

Codecov / codecov/patch

lib/dav/dav.ts#L65

Added line #L65 was not covered by tests
headers: {
requesttoken: getRequestToken() || '',
},
Expand Down

0 comments on commit 1335744

Please sign in to comment.