Skip to content

Improve path resolution in files_version hooks - #42891

Merged
artonge merged 1 commit into
masterfrom
artonge/fix/path_resolution_in_files_versions_hooks
Jan 18, 2024
Merged

Improve path resolution in files_version hooks#42891
artonge merged 1 commit into
masterfrom
artonge/fix/path_resolution_in_files_versions_hooks

Conversation

@artonge

@artongeartonge commented Jan 17, 2024

Copy link
Copy Markdown
Collaborator

When the user is logged in and is accessing the file through a public share, the fileinfo will be relative to the public share owner. So we need to resolve the path relative to the owner's root folder.

This PR ensure that we fall back to the owner root folder if the file cannot be found from the current user perspective.

Fix#40090

@artongeartonge self-assigned this Jan 17, 2024
@artongeartonge added bug 3. to review Waiting for reviews php Pull requests that update Php code labels Jan 17, 2024
@artongeartonge added this to the Nextcloud 29 milestone Jan 17, 2024
@artonge

Copy link
Copy Markdown
CollaboratorAuthor

/backport to stable28

@artonge

Copy link
Copy Markdown
CollaboratorAuthor

/backport to stable27

@artonge

Copy link
Copy Markdown
CollaboratorAuthor

/backport to stable26

@artonge
artongeforce-pushed the artonge/fix/path_resolution_in_files_versions_hooks branch from 8aca484 to 72abd8eCompareJanuary 17, 2024 16:17
Signed-off-by: Louis Chemineau <louis@chmn.me>
@artonge
artonge merged commit 8314fc5 into masterJan 18, 2024
@artonge
artonge deleted the artonge/fix/path_resolution_in_files_versions_hooks branch January 18, 2024 10:08
@backportbot-nextcloud

Copy link
Copy Markdown

The backport to stable26 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable26
git pull origin stable26
# Create the new backport branch
git checkout -b fix/foo-stable26
# Cherry pick the change from the commit sha1 of the change against the default branch# This might cause conflicts. Resolve them.
git cherry-pick abc123
# Push the cherry pick commit to the remote repository and open a pull request
git push origin fix/foo-stable26

Error: Unknown error

More info at https://docs.nextcloud.com/server/latest/developer_manual/getting_started/development_process.html#manual-backport

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsbugphpPull requests that update Php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: basicOperation(): Argument #2 ($path) must be of type string, null given

3 participants

@artonge@skjnldsv@sorbaugh