Description
openedon May 21, 2024
⚠️ This issue respects the following points: ⚠️
- This is a bug, not a question or a configuration/webserver/proxy issue.
- This issue is not already reported on Github OR Nextcloud Community Forum (I've searched it).
- Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- I agree to follow Nextcloud's Code of Conduct.
Bug description
The file picker does not load for moving or copying a file or a folder when not logged in.
Steps to reproduce
- While being logged in, share link of any folder
- Set the sharling link as "can edit" (Screenshot below)
- after the preceding steps, click on "View only", then click on "Can edit" in the drop-down list.
- Go into the folder and create a new file (any type) or folder.
- Log-out of Nextcloud or open a Private window of your web browser.
- Paste the sharing link of your newly shared folder.
- Click on at the right of the previously created file.
- Click on "Move or copy".
Expected behavior
The file picker should load and display the current directory.
Installation method
None
Nextcloud Server version
28
Operating system
None
PHP engine version
None
Web server
None
Database engine version
None
Is this bug present after an update or on a fresh install?
None
Are you using the Nextcloud Server Encryption module?
None
What user-backends are you using?
- Default user-backend (database)
- LDAP/ Active Directory
- SSO - SAML
- Other
Configuration report
No response
List of activated Apps
No response
Nextcloud Signing status
No response
Nextcloud Logs
No response
Additional info
The browser console output
Error: No user id found
M index.mjs:871
l FilePicker-DBGB1Rec.mjs:797
f FilePicker-DBGB1Rec.mjs:825
async* FilePicker-DBGB1Rec.mjs:829
VueJS 25
render index.mjs:33
VueJS 8
s index.mjs:30
pick index.mjs:88
pick index.mjs:87
filepicker dialogs.js:360
actionHandler fileactions.js:701
action fileactions.js:136
_onClickAction fileactionsmenu.js:63
jQuery 10
Backbone 6
_showMenu fileactions.js:375
Underscore 3
_renderInlineAction fileactions.js:467
jQuery 5
vue.runtime.esm.js:3065:16
VueJS 29
render index.mjs:33
VueJS 8
s index.mjs:30
pick index.mjs:88
pick index.mjs:87
filepicker dialogs.js:360
actionHandler fileactions.js:701
action fileactions.js:136
_onClickAction fileactionsmenu.js:63
jQuery 10
Backbone 6
_showMenu fileactions.js:375
Underscore 3
_renderInlineAction fileactions.js:467
jQuery 5
This is the error thrown:
server/apps/files/src/services/Files.ts
Line 45 in 5a6e48e
I think it is where it is called from:
The call of getContents
seems to be the culprit there. And it is not systematic in this file.
- When
method === MoveCopyAction.COPY
, it's usingclient.getDirectoryContents
. - Otherwise (e.g.,
MoveCopyAction.MOVE_OR_COPY
) ,getContents
(which looks for the user id) is used.
Moreover, it seems the comments are not consistent with the code.
Example:
// show conflict file popup if we do not allow overwriting
const otherNodes = await getContents(destination.path)
if (hasConflict([node], otherNodes.contents)) {
It seems nothing is testing of we allow or not overwriting since 9d613d0.
@emoral435, do you have an insight on this?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment