Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion apps/files/src/services/WebdavClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ export const rootPath = `/files/${getCurrentUser()?.uid}`
export const defaultRootUrl = generateRemoteUrl('dav' + rootPath)

export const getClient = (rootUrl = defaultRootUrl) => {
const client = createClient(rootUrl, {
// Encode valid user id characters
const encodedUrl = encodeURI(rootUrl)
.replaceAll('\'', '%27')
Copy link
Member

@skjnldsv skjnldsv Sep 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not have to replace quotes, they are allowed in an URL according to rfc2396

I think the webdav have an issue. Here are the exact two same requests:

Without quote in userId With quote in userId
2023-09-08_09-13 image

const client = createClient(encodedUrl, {
headers: {
requesttoken: getRequestToken() || '',
},
Expand Down
4 changes: 2 additions & 2 deletions dist/files-main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/files-main.js.map

Large diffs are not rendered by default.