Skip to content
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

getJailedPath expects $path to have a trailing / #25703

Conversation

DeepDiver1975
Copy link
Member

fixes #25464

@CLAassistant
Copy link

CLAassistant commented Aug 5, 2016

CLA assistant check
All committers have signed the CLA.

@mention-bot
Copy link

@DeepDiver1975, thanks for your PR! By analyzing the annotation information on this pull request, we identified @icewind1991, @rullzer and @PVince81 to be potential reviewers

@pako81
Copy link

pako81 commented Aug 5, 2016

Tested on 9.0.4. Works THX!

@DeepDiver1975 DeepDiver1975 force-pushed the fix-sharing-tagging-comments-on-mounted-subfolders-master branch from 5313a71 to d817484 Compare August 5, 2016 11:33
@DeepDiver1975
Copy link
Member Author

@pako81 mind retesting? I had to change the fix in order to avoid regressions in other areas 😵

@pako81
Copy link

pako81 commented Aug 5, 2016

@DeepDiver1975 👍 yes, seems to work for already existing files/folders as well as for newly-created ones.

@@ -58,6 +58,9 @@ protected function getSourcePath($path) {
* @return null|string the jailed path or null if the path is outside the jail
*/
protected function getJailedPath($path) {
if ($this->root === '') {
return $path;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DeepDiver1975 Mind explaining how this fix fits in with the PR description ? (no reference to slashes here)
Maybe add a comment in the code to clarify for future reference.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The shared storage is a jailed storage and usually in case of sharing the jailed storage is some folder down somewhere in the users folders structure.
Not in case of sharing a mounted external storage - then the mount point itself is shared and it is the root of the mount which gets jailed.

@PVince81
Copy link
Contributor

PVince81 commented Aug 9, 2016

Makes sense 👍

@DeepDiver1975 DeepDiver1975 merged commit 99611d2 into master Aug 9, 2016
@DeepDiver1975 DeepDiver1975 deleted the fix-sharing-tagging-comments-on-mounted-subfolders-master branch August 9, 2016 08:05
DeepDiver1975 added a commit that referenced this pull request Aug 9, 2016
* getJailedPath expects $path to have a trailing / - fixes #25464

* Adding test case for getPathById including a jailed cache where root is just empty
@DeepDiver1975
Copy link
Member Author

stable9.1: #25737

DeepDiver1975 added a commit that referenced this pull request Aug 9, 2016
* getJailedPath expects $path to have a trailing / - fixes #25464

* Adding test case for getPathById including a jailed cache where root is just empty
@DeepDiver1975
Copy link
Member Author

stable9: #25738

PVince81 pushed a commit that referenced this pull request Aug 11, 2016
…f68d48fe05f290127db7e

[stable9.1] getJailedPath expects $path to have a trailing /  (#25703)
PVince81 pushed a commit that referenced this pull request Aug 11, 2016
* getJailedPath expects $path to have a trailing / - fixes #25464

* Adding test case for getPathById including a jailed cache where root is just empty
DeepDiver1975 added a commit that referenced this pull request Aug 12, 2016
…25738)

* getJailedPath expects $path to have a trailing / - fixes #25464

* Adding test case for getPathById including a jailed cache where root is just empty
@lock
Copy link

lock bot commented Aug 5, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error sharing a Shared Folder
5 participants