Skip to content

fix(f2v): Files list loading with special chars in uid - #40313

Closed
Pytal wants to merge 2 commits into
masterfrom
fix/files-dav
Closed

fix(f2v): Files list loading with special chars in uid#40313
Pytal wants to merge 2 commits into
masterfrom
fix/files-dav

Conversation

@Pytal

@PytalPytal commented Sep 7, 2023

Copy link
Copy Markdown
Member

Summary

BeforeAfter
imageimage
  • Create dav client with correctly encoded root url …/dav/files/test user/…/dav/files/test%20user/

Checklist

@PytalPytal added this to the Nextcloud 28 milestone Sep 7, 2023
@PytalPytal self-assigned this Sep 7, 2023
Comment threadapps/files/src/services/WebdavClient.ts Outdated
@Pytal
Pytal requested a review from skjnldsvSeptember 7, 2023 18:23
@PytalPytal added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Sep 7, 2023
@PytalPytal changed the title fix(f2v): Files list loading with spaces in uidfix(f2v): Files list loading with special chars in uidSep 7, 2023
@Pytal

Pytal commented Sep 7, 2023

Copy link
Copy Markdown
MemberAuthor

Now correctly encodes single quotes as defined in

if (preg_match('/[^a-zA-Z0-9 _.@\-\']/', $uid)) {

@PytalPytal added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Sep 7, 2023
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Signed-off-by: Christopher Ng <chrng8@gmail.com>
const client = createClient(rootUrl, {
// Encode valid user id characters
const encodedUrl = encodeURI(rootUrl)
.replaceAll('\'', '%27')

@skjnldsvskjnldsvSep 8, 2023

Copy link
Copy Markdown
Member

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 userIdWith quote in userId
2023-09-08_09-13image

@skjnldsvskjnldsv mentioned this pull request Nov 1, 2023
This was referenced Nov 6, 2023
@blizzzblizzz mentioned this pull request Nov 14, 2023
@blizzzblizzz mentioned this pull request Nov 20, 2023
5 tasks
@blizzzblizzz modified the milestones: Nextcloud 28, Nextcloud 29Nov 23, 2023
@Pytal

Copy link
Copy Markdown
MemberAuthor

Superseded by perry-mitchell/webdav-client#360

@PytalPytal closed this Nov 24, 2023
@Pytal
Pytal deleted the fix/files-dav branch November 24, 2023 03:12
@skjnldsvskjnldsv removed this from the Nextcloud 29 milestone Feb 23, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@Pytal@AndyScherzinger@artonge@skjnldsv@blizzz