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

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

Closed
wants to merge 2 commits into from

Conversation

Pytal
Copy link
Member

@Pytal Pytal commented Sep 7, 2023

Summary

Before After
image image
  • Create dav client with correctly encoded root url …/dav/files/test user/…/dav/files/test%20user/

Checklist

@Pytal Pytal added this to the Nextcloud 28 milestone Sep 7, 2023
@Pytal Pytal self-assigned this Sep 7, 2023
apps/files/src/services/WebdavClient.ts Outdated Show resolved Hide resolved
@Pytal Pytal requested a review from skjnldsv September 7, 2023 18:23
@Pytal Pytal added 2. developing Work in progress and removed 3. to review Waiting for reviews labels Sep 7, 2023
@Pytal Pytal changed the title fix(f2v): Files list loading with spaces in uid fix(f2v): Files list loading with special chars in uid Sep 7, 2023
@Pytal
Copy link
Member Author

Pytal commented Sep 7, 2023

Now correctly encodes single quotes as defined in

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

@Pytal Pytal added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Sep 7, 2023
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

@skjnldsv skjnldsv mentioned this pull request Nov 1, 2023
This was referenced Nov 6, 2023
@blizzz blizzz mentioned this pull request Nov 14, 2023
@blizzz blizzz mentioned this pull request Nov 20, 2023
5 tasks
@blizzz blizzz modified the milestones: Nextcloud 28, Nextcloud 29 Nov 23, 2023
@Pytal
Copy link
Member Author

Pytal commented Nov 24, 2023

Superseded by perry-mitchell/webdav-client#360

@Pytal Pytal closed this Nov 24, 2023
@Pytal Pytal deleted the fix/files-dav branch November 24, 2023 03:12
@skjnldsv skjnldsv removed this from the Nextcloud 29 milestone Feb 23, 2024
Sign up for free to 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