owncloud / owncloud/web-extensions

[importer] while trying to upload files denied by policy, the upload dialog gets stuck with upload loading state

Open
#167 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
16
Forks
11
Avg merge
1d 14h
Merged PRs (30d)
23

Description

Steps to reproduce
  1. Run oc10 server
  2. Create a folder and upload a hidden file in it (.myfile)
  3. Create a folder public link
  4. Run ocis with policy service setup
  5. From web, import from webdav public link
  6. Try to import the hidden file

Image

Logs

companion-1  | ::ffff:172.22.0.3 - - [09/Apr/2025:09:16:27 +0000] "POST /companion/webdav/get/%2F.lorem HTTP/1.1" 200 48 "https://host.docker.internal:9200/files/spaces/personal/admin?fileId=02227977-bff8-4633-be66-b0743479d07f%24ece9c035-1f54-4ebd-8b16-13e20ba535a7%21ece9c035-1f54-4ebd-8b16-13e20ba535a7&items-per-page=100&files-spaces-generic-view-mode=resource-table&tiles-size=2" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36"
companion-1  | ::ffff:172.22.0.3 - - [09/Apr/2025:09:16:27 +0000] "GET /companion/webdav/list/ HTTP/1.1" 200 801 "https://host.docker.internal:9200/files/spaces/personal/admin?fileId=02227977-bff8-4633-be66-b0743479d07f%24ece9c035-1f54-4ebd-8b16-13e20ba535a7%21ece9c035-1f54-4ebd-8b16-13e20ba535a7&items-per-page=100&files-spaces-generic-view-mode=resource-table&tiles-size=2" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36"
companion-1  | companion: 2025-04-09T09:16:27.937Z [info] socket.connect connection received from 05a018a2-e85d-4eaa-b504-b3973fd0eb53
companion-1  | companion: 2025-04-09T09:16:27.937Z [debug] 05a018a2 uploader.socket.wait socket connection received
companion-1  | companion: 2025-04-09T09:16:27.937Z [debug] null Socket connection received. Starting remote download/upload.
companion-1  | companion: 2025-04-09T09:16:27.939Z [debug] 05a018a2 uploader Received from client: resume
companion-1  | companion: 2025-04-09T09:16:27.945Z [error] uploader.tus.error DetailedError: tus: unexpected response while creating upload, originated from request (method: POST, url: https://host.docker.internal:9200/remote.php/dav/spaces/02227977-bff8-4633-be66-b0743479d07f$ece9c035-1f54-4ebd-8b16-13e20ba535a7, response code: 403, response text: {"error":{"code":"deniedByPolicy","message":"Operation denied due to security policies","innererror":{"date":"2025-04-09T09:16:27Z","filename":".lorem","method":"POST","path":"/remote.php/dav/spaces/02227977-bff8-4633-be66-b0743479d07f$ece9c035-1f54-4ebd-8b16-13e20ba535a7","request-id":"1eaed1ff-21e7-4575-93c3-8d363252b16b"}}}
companion-1  | , request id: 1eaed1ff-21e7-4575-93c3-8d363252b16b)
companion-1  |     at Upload._emitHttpError (/app/node_modules/tus-js-client/lib.es5/upload.js:879:23)
companion-1  |     at /app/node_modules/tus-js-client/lib.es5/upload.js:1003:18
companion-1  |     at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
companion-1  |   originalRequest: Request {
companion-1  |     _method: 'POST',
...
},
companion-1  |     _body: '{"error":{"code":"deniedByPolicy","message":"Operation denied due to security policies","innererror":{"date":"2025-04-09T09:16:27Z","filename":".lorem","method":"POST","path":"/remote.php/dav/spaces/02227977-bff8-4633-be66-b0743479d07f$ece9c035-1f54-4ebd-8b16-13e20ba535a7","request-id":"1eaed1ff-21e7-4575-93c3-8d363252b16b"}}}\n'
companion-1  |   },
companion-1  |   causingError: null
companion-1  | }
companion-1  | companion: 2025-04-09T09:16:27.946Z [debug] 05a018a2 cleanup
...
uploader.error DetailedError: tus: unexpected response while creating upload, originated from request (
  method: POST, 
  url: https://host.docker.internal:9200/remote.php/dav/spaces/02227977-bff8-4633-be66-b0743479d07f$ece9c035-1f54-4ebd-8b16-13e20ba535a7, 
  response code: 403, 
  response text: 
    {"error":{"code":"deniedByPolicy","message":"Operation denied due to security policies","innererror":{"date":"2025-04-09T09:16:31Z","filename":".lorem","method":"POST","path":"/remote.php/dav/spaces/02227977-bff8-4633-be66-b0743479d07f$ece9c035-1f54-4ebd-8b16-13e20ba535a7","request-id":"28066843-282f-4c75-a672-b590a0f2e924"}}}
Expected

Upload failed dialog

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the listed WebDAV import flow with a hidden file denied by policy, then trace the importer upload error handling and dialog state. The fix is done when a 403 deniedByPolicy response closes the loading state and shows the expected Upload failed dialog.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.