owncloud / owncloud/ocis

[BUG] `/app/list` endpoint has default app non-existent in the providers

Open
#6,141 0 comments 0 reactions 0 assignees View on GitHub
Type:Bug
Dominant language
Go
Stars
2.1k
Forks
274
Avg merge
2d 1h
Merged PRs (30d)
103

Description

## Describe the bug

By querying the `/app/list` endpoint of a oCIS server, it is possible to find an app name in the `default_application` subnode that doesn't belong to the providers list in the `app_providers` subnode of the same node. This leads to an always incorrect and unnecessary network call from the clients using this endpoint, since sending an app name that we can't find in the available providers will be always rejected by the server.

## Steps to reproduce

Steps to reproduce the behavior:

1. Retrieve data from `/app/list` endpoint
2. Try to open in web a file with the default app (i.e. Collabora), that doesn't appear in the app providers list
3. Server returns an error

## Expected behavior
Be consistent in both subnodes: the default application is always one of the available app providers.

## Actual behavior
The default application does not appear in the available app providers list, and so, it cannot be opened by using this default application.

## Setup

I'm using [https://ocis.ocis-wopi.latest.owncloud.works](https://ocis.ocis-wopi.latest.owncloud.works/).

## Additional context
Now it seems that Collabora was added to the list of app providers, but when I tested this, the response was like this:

![image](https://user-images.githubusercontent.com/57049315/234306455-d188a2f4-4507-45ca-a847-00318489178d.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.