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

Improve path resolution in files_version hooks #42891

Merged
merged 1 commit into from
Jan 18, 2024

Conversation

artonge
Copy link
Contributor

@artonge artonge commented Jan 17, 2024

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

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

artonge commented Jan 17, 2024

/backport to stable28

@artonge
Copy link
Contributor Author

artonge commented Jan 17, 2024

/backport to stable27

@artonge
Copy link
Contributor Author

artonge commented Jan 17, 2024

/backport to stable26

@artonge artonge force-pushed the artonge/fix/path_resolution_in_files_versions_hooks branch from 8aca484 to 72abd8e Compare January 17, 2024 16:17
@artonge artonge merged commit 8314fc5 into master Jan 18, 2024
50 checks passed
@artonge artonge deleted the artonge/fix/path_resolution_in_files_versions_hooks branch January 18, 2024 10:08
@backportbot-nextcloud
Copy link

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 free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews backport-request bug php Pull 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