Skip to content

Uploading into a password-protected link right after entering the password fails when web and server run on different origins #3668

Closed

Description

@AlexAndBear

Initial Checklist

  • I understand this is a bug report and questions should be posted in the Community Discussions
  • I searched issues and couldn’t find anything (or linked relevant results below)

Bug Description

Uploading into a password-protected link right after entering the password fails when web and server run on different origins. Cause: packages/web-client/src/webdav/listFiles.ts:103 builds the public space without serverUrl; resolvePublicLink.vue:204 upserts it and spaces.ts:186 Object.assigns it over the runtime space, so getWebDavUrl becomes relative (HandleUpload.ts:180).

Reproduction Steps

  1. Open /s/<edit-link> anonymously and enter the password.
  2. Upload a file.

Expected Outcome

The file is uploaded.

Actual Outcome

The tus request goes to the web origin (POST https://<web>/dav/public-files/<token> 404) and the upload fails. After a reload it works.

Screenshot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions