nextcloud / deck

🗂 Kanban-style project & personal management tool for Nextcloud, similar to Trello
https://apps.nextcloud.com/apps/deck
GNU Affero General Public License v3.0
1.22k stars 276 forks source link

Deleted cards break "occ deck:export" #6446

Open fracklaus opened 1 week ago

fracklaus commented 1 week ago

How to use GitHub

Describe the bug

The occ deck:export functionality has a bug and does not work when a card has been deleted within deck. The following error appears: [OCA\Deck\NoPermissionException] Card is deleted

It seems that deck:export is checking for read access in /var/www/nextcloud/apps/deck/lib/Service/CommentService.php:46 by calling $this->permissionService->checkPermission(...). When executed on a deleted card, checkPermission throws an error "Card is deleted" that is not being catched. The right reaction in deck:export should be to ignore the deleted card and continue with the next, instead of exiting due to the thrown exception.

To Reproduce Steps to reproduce the behavior:

  1. Create a board in nextcloud deck as user USER
  2. Enter some cards
  3. Delete at least one card
  4. Execute occ deck:export USER
  5. Export will fail with "Card is deleted" exception

Expected behavior A clear and concise description of what you expected to happen.

Export continues, deleted card is not part of export.

Screenshots If applicable, add screenshots to help explain your problem.

Client details:

Error happens in command line on the server, client does not seem to be relevant.

Server details **Operating system**: Debian 12 **Web server:** apache **Database:** postgresql **PHP version:** 8.2.24 **Nextcloud version:** (see Nextcloud admin page) 30.0.1.2 **Where did you install Nextcloud from:** **Signing status:** ``` Login as admin user into your Nextcloud and access http://example.com/index.php/settings/integrity/failed paste the results here. ``` No errors have been found. **List of activated apps:** ``` If you have access to your command line run e.g.: sudo -u www-data php occ app:list from within your Nextcloud installation folder ``` **Nextcloud configuration:** ``` If you have access to your command line run e.g.: sudo -u www-data php occ config:list system from within your Nextcloud installation folder or Insert your config.php content here Make sure to remove all sensitive content such as passwords. (e.g. database password, passwordsalt, secret, smtp password, …) ``` **Are you using an external user-backend, if yes which one:** LDAP/ActiveDirectory/Webdav/... QctiveDirectory
Logs #### Nextcloud log (data/nextcloud.log) ``` Insert your Nextcloud log here ``` #### Browser log ``` Insert your browser log here, this could for example include: a) The javascript console log b) The network log c) ... ```
elzody commented 1 day ago

I was able to reproduce this. The proper behavior upon first impression is to disregard any deleted cards and continue to the next.