nextcloud / nextcloud/server

[Bug]: Rejecting share for a file that is no longer exist is not working

Open
#35,069 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage 25-feedback bug feature: sharing
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

⚠️ This issue respects the following points: ⚠️
  • This is a bug, not a question or a configuration/webserver/proxy issue.
  • This issue is not already reported on Github (I've searched it).
  • Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
  • Nextcloud Server is running on 64bit capable CPU, PHP and OS.
  • I agree to follow Nextcloud's Code of Conduct.
Bug description

There are pending shares listed that I haven't either rejected or accepted for a long time. When I tried to reject those shares, it shows, "Something happened. Unable to reject the share."

Those files don't exist anymore or might be moved that's the reason behind it.

Steps to reproduce
  1. Share some files with another user
  2. Move or delete that file
  3. The other user can not accept or reject the file
Expected behavior

Such pending shares shouldn't be shown in the first place.

Installation method

Community Manual installation with Archive

Operating system

RHEL/CentOS

PHP engine version

PHP 8.0

Web server

Apache (supported)

Database engine version

PostgreSQL

Is this bug present after an update or on a fresh install?

No response

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?
  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other
Configuration report
{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "session_keepalive": false,
        "auto_logout": true,
        "trusted_domains": [
            "SOME URL"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "25.0.1.1",
        "overwrite.cli.url": "https:\/\/nextacso.com\/",
        "htaccess.RewriteBase": "\/",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "filelocking.enabled": true,
        "skeletondirectory": "",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "allow_local_remote_servers": true,
        "default_phone_region": "ET",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379,
            "timeout": 0,
            "password": "***REMOVED SENSITIVE VALUE***"
        },
        "app_install_overwrite": [
            "music",
            "pdfdraw",
            "dashboardcharts",
            "whiteboard",
            "files_texteditor",
            "rainloop",
            "files_mindmap",
            "flow_notifications",
            "files_trackdownloads",
            "apporder",
            "quicknotes",
            "extract",
            "data_request",
            "drawio"
        ],
        "maintenance": false,
        "loglevel": 3,
        "mail_smtpauthtype": "LOGIN",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "twofactor_enforced": "false",
        "twofactor_enforced_groups": [
            "IT Team"
        ],
        "twofactor_enforced_excluded_groups": [
           "Some Groups"
        ],
        "mail_smtpsecure": "ssl",
        "theme": "",
        "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
        "updater.release.channel": "stable",
        "mail_smtpauth": 1,
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***"
    }
}
List of activated Apps
Enabled:
  - activity: 2.17.0
  - admin_audit: 1.15.0
  - analytics: 4.5.0
  - announcementcenter: 6.4.0
  - appointments: 1.14.0
  - apporder: 0.15.0
  - approval: 1.0.10
  - bruteforcesettings: 2.5.0
  - calendar: 4.1.0
  - calendar_resource_management: 0.3.1
  - camerarawpreviews: 0.8.0
  - circles: 25.0.0
  - cloud_federation_api: 1.8.0
  - comments: 1.15.0
  - contacts: 5.0.1
  - contactsinteraction: 1.6.0
  - dashboard: 7.5.0
  - data_request: 1.11.0
  - dav: 1.24.0
  - deck: 1.8.1
  - drawio: 1.0.3
  - event_update_notification: 2.0.0
  - external: 5.0.0
  - extract: 1.3.5
  - federatedfilesharing: 1.15.0
  - federation: 1.15.0
  - files: 1.20.1
  - files_accesscontrol: 1.15.0
  - files_automatedtagging: 1.15.0
  - files_downloadactivity: 1.15.0
  - files_external: 1.17.0
  - files_pdfviewer: 2.6.0
  - files_rightclick: 1.4.0
  - files_sharing: 1.17.0
  - files_texteditor: 2.14.0
  - files_trackdownloads: 1.11.0
  - files_trashbin: 1.15.0
  - files_versions: 1.18.0
  - firstrunwizard: 2.14.0
  - flow_notifications: 1.4.0
  - forms: 3.0.1
  - geoblocker: 0.5.7
  - groupfolders: 13.0.0
  - guests: 2.3.0
  - integration_github: 1.0.12
  - logreader: 2.10.0
  - lookup_server_connector: 1.13.0
  - maps: 0.2.1
  - metadata: 0.17.0
  - music: 1.7.0
  - nextcloud_announcements: 1.14.0
  - notifications: 2.13.1
  - oauth2: 1.13.0
  - password_policy: 1.15.0
  - photos: 2.0.0
  - privacy: 1.9.0
  - provisioning_api: 1.15.0
  - quicknotes: 0.8.1
  - quota_warning: 1.15.0
  - recommendations: 1.4.0
  - registration: 2.0.0
  - related_resources: 1.0.3
  - richdocuments: 7.0.1
  - serverinfo: 1.15.0
  - settings: 1.7.0
  - sharebymail: 1.15.0
  - snappymail: 2.20.6
  - spreed: 15.0.1
  - support: 1.8.0
  - survey_client: 1.13.0
  - suspicious_login: 4.3.0
  - systemtags: 1.15.0
  - tasks: 0.14.5
  - text: 3.6.0
  - theming: 2.0.1
  - theming_customcss: 1.12.0
  - twofactor_backupcodes: 1.14.0
  - updatenotification: 1.15.0
  - user_ldap: 1.15.0
  - user_status: 1.5.0
  - viewer: 1.9.0
  - weather_status: 1.5.0
  - workflow_ocr: 1.25.1
  - workflow_pdf_converter: 1.10.0
  - workflowengine: 2.7.0
Disabled:
  - duplicatefinder: 0.0.15
  - encryption: 2.13.0
  - files_markdown: 2.3.6
  - files_mindmap: 0.0.26
  - flowupload: 1.1.3
  - login_notes: 1.1.0
  - talked: 0.4.0
  - twofactor_totp: 6.0.0
Nextcloud Signing status
No errors have been found.
Nextcloud Logs
None related to this issue.
Additional info

image

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source files or tests are named. Start by reproducing the pending-share flow after moving or deleting the shared file, then trace the accept and reject handlers for file shares; done means obsolete pending shares are no longer shown or can be rejected successfully, with regression coverage.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.