-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Download a file in a subfolder in a sharedlink is not working #2615
Conversation
the $node created using the path (GET) parameter is not used when executing fileListDownloaded()
@daita, thanks for your PR! By analyzing the history of the files in this pull request, we identified @schiessle, @rullzer and @LukasReschke to be potential reviewers. |
cc @rullzer Thoughts? |
Can reproduce. |
Tested and works, I can also see why this is needed. At the moment I don't have a better idea how to solve it.... so 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in emitAccessShareHook()
$itemType = $share->getNodeType();
$itemSource = $share->getNodeId();
will get the original node's data. My gut feeling is to have this adjusted, too.
For #2615 Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
@@ -542,9 +542,9 @@ public function downloadShare($token, $files = null, $path = '', $downloadStartS | |||
* @param Share\IShare $share | |||
* @param array $files_list | |||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PHPDoc needs update here.
Signed-off-by: Maxence Lange <maxence@pontapreta.net>
With regard to #2615 (review) the hook is caught by the auditing app only (within the Nextcloud org on Github), but uses the node type. Probably it's OK to continue with the fix as is and if necessary adjust for 11.0.1. Along with a regression test. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Lets get this in. I'll see if I can add tests later!
Downloading a file in a subfolder returns a 404.
The $node created using the path (GET) parameter is not used when executing fileListDownloaded()