Skip to content

Conversation

@salmart-dev
Copy link
Contributor

@salmart-dev salmart-dev commented Aug 28, 2025

Fixes: #2943

This PR fixes an issue where deleting a file while being in the viewer fails because of "wrong owner type".

The issue above happens because the client.stat requests has a Number for ownerId, when the ownerId is a number (e.g. 123456).

@salmart-dev salmart-dev self-assigned this Aug 28, 2025
@salmart-dev salmart-dev added bug Something isn't working 3. to review Waiting for reviews labels Aug 28, 2025
Copy link
Member

@AndyScherzinger AndyScherzinger left a comment

Choose a reason for hiding this comment

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

🐘

@AndyScherzinger AndyScherzinger added this to the Nextcloud 32 milestone Aug 28, 2025
@AndyScherzinger
Copy link
Member

/backport to stable31

@backportbot backportbot bot added the backport-request Pending backport by the backport-bot label Aug 28, 2025
@AndyScherzinger
Copy link
Member

/backport to stable30

@AndyScherzinger
Copy link
Member

/backport to stable29

@skjnldsv
Copy link
Member

Nice catch!

@skjnldsv
Copy link
Member

/compile rebase

The ownerId is supposed to always be a string value, but if someone's
userId is a Numeric name, then file deletion breaks, because the ownerId
is taken in as Number.

Signed-off-by: Salvatore Martire <[email protected]>
@salmart-dev salmart-dev enabled auto-merge August 28, 2025 10:55
@skjnldsv skjnldsv disabled auto-merge August 28, 2025 11:24
@skjnldsv skjnldsv merged commit fcfa54e into master Aug 28, 2025
45 of 51 checks passed
@skjnldsv skjnldsv deleted the fix/wrongOwnerType branch August 28, 2025 11:24
@backportbot
Copy link

backportbot bot commented Aug 28, 2025

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

# Switch to the target branch and update it
git checkout stable29
git pull origin stable29

# Create the new backport branch
git checkout -b backport/2942/stable29

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick e573302e

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/2942/stable29

Error: Failed to check for changes with origin/stable29: No changes found in backport branch


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@backportbot
Copy link

backportbot bot commented Aug 28, 2025

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

# Switch to the target branch and update it
git checkout stable30
git pull origin stable30

# Create the new backport branch
git checkout -b backport/2942/stable30

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick e573302e

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/2942/stable30

Error: Failed to check for changes with origin/stable30: No changes found in backport branch


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@backportbot
Copy link

backportbot bot commented Aug 28, 2025

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

# Switch to the target branch and update it
git checkout stable31
git pull origin stable31

# Create the new backport branch
git checkout -b backport/2942/stable31

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick e573302e

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/2942/stable31

Error: Failed to check for changes with origin/stable31: No changes found in backport branch


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

@skjnldsv skjnldsv modified the milestones: Nextcloud 33, Nextcloud 32 Sep 28, 2025
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 Pending backport by the backport-bot bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Impossible to delete any file, when the owner has a numeric name

4 participants