nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
27.34k stars 4.06k forks source link

[Bug]: Move folders/files to public link share: No user ID found #45888

Open strangmann opened 4 months ago

strangmann commented 4 months ago

⚠️ This issue respects the following points: ⚠️

Bug description

Moving files or folders inside a public link share (as anonymous user) failed. The moving-window "Choose target filder" pops up but there is no content (only loading bars)

Steps to reproduce

  1. create link share with the following rights: "can edit"
  2. open link share in a private window without logging in
  3. moving process cannot be carried out in the private window

Expected behavior

The contents of other folders/files will be inside the link share instead of the loading bars and it is possible to copy/move data

Installation method

Community Manual installation with Archive

Nextcloud Server version

28

Operating system

RHEL/CentOS

PHP engine version

PHP 8.2

Web server

Nginx

Database engine version

MariaDB

Is this bug present after an update or on a fresh install?

Fresh Nextcloud Server install

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

Configuration report

No response

List of activated Apps

Enabled:
  - activity: 2.20.0
  - circles: 28.0.0
  - cloud_federation_api: 1.11.0
  - comments: 1.18.0
  - contactsinteraction: 1.9.0
  - dashboard: 7.8.0
  - dav: 1.29.1
  - federatedfilesharing: 1.18.0
  - federation: 1.18.0
  - files: 2.0.0
  - files_pdfviewer: 2.9.0
  - files_reminders: 1.1.0
  - files_sharing: 1.20.0
  - files_trashbin: 1.18.0
  - files_versions: 1.21.0
  - firstrunwizard: 2.17.0
  - logreader: 2.13.0
  - lookup_server_connector: 1.16.0
  - nextcloud_announcements: 1.17.0
  - notifications: 2.16.0
  - oauth2: 1.16.3
  - password_policy: 1.18.0
  - photos: 2.4.0
  - privacy: 1.12.0
  - provisioning_api: 1.18.0
  - recommendations: 2.0.0
  - related_resources: 1.3.0
  - serverinfo: 1.18.0
  - settings: 1.10.1
  - sharebymail: 1.18.0
  - support: 1.11.1
  - survey_client: 1.16.0
  - systemtags: 1.18.0
  - text: 3.9.1
  - theming: 2.3.0
  - twofactor_backupcodes: 1.17.0
  - updatenotification: 1.18.0
  - user_ldap: 1.19.0
  - user_saml: 6.1.3
  - user_status: 1.8.1
  - viewer: 2.2.0
  - weather_status: 1.8.0
  - workflowengine: 2.10.0

Nextcloud Signing status

No response

Nextcloud Logs

All logs to sample Link-Share: N6zoA28bzBmq7ta

Jun 15, 202413:37:25.877

Jun 15 13:37:25 nctest01 nctest: myclientIP - N6zoA28bzBmq7ta [15/Jun/2024:13:37:25 +0200] "PROPFIND /public.php/webdav// HTTP/2.0" 207 3907 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0" "TLSv1.3/TLS_AES_256_GCM_SHA384" "-"

source: nctest01 event_type: v4_f6f01d98 facility: local7 priority: info hostname: nctest01 appname: nctest
Jun 15, 202413:37:25.869

Jun 15 13:37:25 nctest01 nctest: myclientIP - N6zoA28bzBmq7ta [15/Jun/2024:13:37:25 +0200] "PROPFIND /public.php/webdav// HTTP/2.0" 207 3907 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0" "TLSv1.3/TLS_AES_256_GCM_SHA384" "-"

source: nctest01 event_type: v4_f6f01d98 facility: local7 priority: info hostname: nctest01 appname: nctest
Jun 15, 202413:37:21.528

Jun 15 13:37:21 nctest01 nctest: myclientIP - N6zoA28bzBmq7ta [15/Jun/2024:13:37:21 +0200] "PROPFIND /public.php/webdav/ HTTP/2.0" 207 3347 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0" "TLSv1.3/TLS_AES_256_GCM_SHA384" "-"

source: nctest01 event_type: v4_f6f01d98 facility: local7 priority: info hostname: nctest01 appname: nctest
Jun 15, 202413:37:21.511

Jun 15 13:37:21 nctest01 nctest: myclientIP - - [15/Jun/2024:13:37:21 +0200] "GET /ocs/v2.php/apps/text/public/workspace?path=%2F&shareToken=N6zoA28bzBmq7ta HTTP/2.0" 404 112 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0" "TLSv1.3/TLS_AES_256_GCM_SHA384" "-"

source: nctest01 event_type: v4_2d35fd7c facility: local7 priority: info hostname: nctest01 appname: nctest
Jun 15, 202413:37:11.658

Jun 15 13:37:11 nctest01 nctest: myclientIP - - [15/Jun/2024:13:37:11 +0200] "GET /s/N6zoA28bzBmq7ta HTTP/2.0" 200 8324 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0" "TLSv1.3/TLS_AES_256_GCM_SHA384" "-"

Additional info

Error in Browser-Console:

Error: No user id found
    M index.mjs:871
    l FilePicker-DBGB1Rec.mjs:797
    f FilePicker-DBGB1Rec.mjs:825
core-common.js:2:2116787
    cn https://nctest/dist/core-common.js?v=8453725f-0:2
    dn https://nctest/dist/core-common.js?v=8453725f-0:2
    ln https://nctest/dist/core-common.js?v=8453725f-0:2
    un https://nctest/dist/core-common.js?v=8453725f-0:2
strangmann commented 4 months ago

Seems to be fixed in 28.0.7

grnd-alt commented 3 months ago

reproduced on 28.0.8 also happens when opening public share in non private browser (logged in). drag and drop works. when opening file Picker: Propfind request to: /public.php/dav/files/\<public-share-id> request returns 404 file picker loads indefinitely

susnux commented 3 months ago

Just to confirm this is an issue on Nextcloud 28 and a more complex one to fix, is is fixed with Nextcloud 29 and later but for 28 we need special handling as the DAV v2 endpoint is not available

nickvergessen commented 2 months ago

I propose to temporarily just pin the old version?