Skip to content

Conversation

@mikaelh
Copy link
Contributor

@mikaelh mikaelh commented Oct 26, 2018

Cherry pick from 235e348
This commit fixes an infinite loop in ShareHelper:getPathsForUsers() for certain shares as NotFoundException is otherwise never thrown in while (!empty($byId)).

This can be reproduced in latest v12 (tested in 12.0.12) as well as latest v13 (tested in 13.0.7)


If you now keep calling $node->getParent() you will at some point get
the RootFolder back. This is a nice termination check and will prevent
endless loops if an exit condition is slightly off.

Signed-off-by: Roeland Jago Douma [email protected]

If you now keep calling $node->getParent() you will at some point get
the RootFolder back. This is a nice termination check and will prevent
endless loops if an exit condition is slightly off.

Signed-off-by: Roeland Jago Douma <[email protected]>
Copy link
Member

@rullzer rullzer left a comment

Choose a reason for hiding this comment

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

Fine by me

Copy link
Member

@MorrisJobke MorrisJobke left a comment

Choose a reason for hiding this comment

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

Code makes sense 👍

@MorrisJobke MorrisJobke merged commit 9223159 into nextcloud:stable13 Oct 26, 2018
@MorrisJobke MorrisJobke mentioned this pull request Nov 13, 2018
@MorrisJobke MorrisJobke mentioned this pull request Nov 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants