Skip to content

[Bug]: cannot share to remote users with "show_federated_shares_to_trusted_servers_as_internal" set to true #56622

@maximelehericy

Description

@maximelehericy

⚠️ This issue respects the following points: ⚠️

Bug description

The PR #55080 introduces a config switch to show shares to trusted servers in the internal share section.

However, enabling this setting prevents shares to federated cloudIDs to be created:

Image

when something is typed in the external share section, the following request

GET /ocs/v2.php/apps/files_sharing/api/v1/sharees?format=json&itemType=folder&search=tata%40cloud.net&lookup=true&perPage=25&shareType%5B%5D=4&shareType%5B%5D=6&shareType%5B%5D=9

returns the following response:

{
  "ocs": {
    "meta": {
      "status": "ok",
      "statuscode": 200,
      "message": "OK"
    },
    "data": {
      "exact": {
        "users": [],
        "groups": [],
        "remotes": [
          {
            "label": "tata (cloud.net)",
            "uuid": "tata",
            "name": "tata",
            "value": {
              "shareType": 6,
              "shareWith": "tata@cloud.net",
              "server": "cloud.net",
              "isTrustedServer": false
            }
          }
        ],
        "remote_groups": [],
        "emails": [
          {
            "label": "tata@cloud.net",
            "uuid": "tata@cloud.net",
            "value": {
              "shareType": 4,
              "shareWith": "tata@cloud.net"
            }
          }
        ],
        "circles": [],
        "rooms": [],
        "lookup": []
      },
      "users": [],
      "groups": [],
      "remotes": [],
      "remote_groups": [],
      "emails": [],
      "lookup": [],
      "circles": [],
      "rooms": [],
      "lookupEnabled": true
    }
  }
}

In the external share section, the result

 "remotes": [
          {
            "label": "tata (cloud.net)",
            "uuid": "tata",
            "name": "tata",
            "value": {
              "shareType": 6,
              "shareWith": "tata@cloud.net",
              "server": "cloud.net",
              "isTrustedServer": false
            }
          }
        ],

is filtered out.

Steps to reproduce

  1. spawn a vanilla nextcloud 31.0.11
  2. set show_federated_shares_to_trusted_servers_as_internal to true
  3. enter a federated cloud ID in the external share section

Expected behavior

I should be able to share to remote federated user.

Image

Nextcloud Server version

31

Operating system

Other

PHP engine version

None

Web server

None

Database engine version

None

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

None

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?

  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other

Configuration report

List of activated Apps

Nextcloud Signing status

Nextcloud Logs

Additional info

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    0. Needs triagePending check for reproducibility or if it fits our roadmap31-feedbackbug

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions