Skip to content

Regression 19.0.6: Federation with server on which account are only local (for complete name) #24682

Closed

Description

@doc75

How to use GitHub

  • Please use the 👍 reaction to show that you are affected by the same issue.
  • Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
  • Subscribe to receive notifications on status change and new comments.

Commit introducing this regression

Issue was certainly introduced with this commit: 16a78f5

This commit does not take into account that user setting their Full name as local will not have FN property in the trusted instances.

Steps to reproduce

Pre-requisite: You should have 2 Nextcloud instances trusting each other in terms of Federation.

  1. On Instance A, make sure your account is setting its Full Name as being only local
  2. On instance B, synchronize the addressbooks using: occ federation:sync-addressbooks
  3. Now on Instance B, the user does not have anymore a FN available

Expected behaviour

On NC 19.0.6, I should not see the error shown below.
Tell us what should happen

Actual behaviour

On NC 19.0.5, no specific issue.
On NC 19.0.6, log is full of error message and nextcloud.log is growing rapidly (cf. log extract below)

Server configuration

Operating system: Docker official image (19-fpm)

Web server: NGINX

Database: PostgreSQL

PHP version: Docker official image (19-fpm)

Nextcloud version: 19.0.6

Updated from an older Nextcloud/ownCloud or fresh install: Updated from 19.0.5

Where did you install Nextcloud from: Docker official image (19-fpm)

Signing status:

Signing status
No errors have been found.

List of activated apps:

App list
Enabled:
  - accessibility: 1.5.0
  - activity: 2.12.1
  - admin_audit: 1.9.0
  - bruteforcesettings: 2.0.1
  - calendar: 2.0.4
  - cloud_federation_api: 1.2.0
  - comments: 1.9.0
  - contacts: 3.4.2
  - contactsinteraction: 1.0.0
  - cospend: 1.0.5
  - dav: 1.15.0
  - deck: 1.2.2
  - documentserver_community: 0.1.8
  - encryption: 2.7.0
  - federatedfilesharing: 1.9.0
  - federation: 1.9.0
  - files: 1.14.0
  - files_external: 1.10.0
  - files_markdown: 2.3.1
  - files_pdfviewer: 1.8.0
  - files_rightclick: 0.16.0
  - files_sharing: 1.11.0
  - files_trashbin: 1.9.0
  - files_versions: 1.12.0
  - files_videoplayer: 1.8.0
  - firstrunwizard: 2.8.0
  - gpxpod: 4.2.2
  - keeweb: 0.6.3
  - logreader: 2.4.0
  - lookup_server_connector: 1.7.0
  - mail: 1.4.2
  - maps: 0.1.6
  - nextcloud_announcements: 1.8.0
  - notes: 3.6.4
  - notifications: 2.7.0
  - oauth2: 1.7.0
  - onlyoffice: 6.2.0
  - password_policy: 1.9.1
  - photos: 1.1.0
  - privacy: 1.3.0
  - provisioning_api: 1.9.0
  - quota_warning: 1.8.0
  - recommendations: 0.7.0
  - serverinfo: 1.9.0
  - settings: 1.1.0
  - sharebymail: 1.9.0
  - spreed: 9.0.6
  - support: 1.2.1
  - survey_client: 1.7.0
  - systemtags: 1.9.0
  - text: 3.0.1
  - theming: 1.10.0
  - twofactor_backupcodes: 1.8.0
  - twofactor_totp: 5.0.0
  - updatenotification: 1.9.0
  - viewer: 1.3.0
  - workflowengine: 2.1.0
Disabled:
  - user_ldap

Nextcloud configuration:

Config report
{
    "system": {
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "cloud.mesdatas.org",
            "cloud.virlet.org"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "19.0.6.2",
        "overwrite.cli.url": "https:\/\/cloud.mesdatas.org",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "overwriteprotocol": "https",
        "default_language": "fr",
        "default_locale": "fr_FR",
        "skeletondirectory": "",
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "tls",
        "mail_sendmailmode": "smtp",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "587",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "updater.release.channel": "stable",
        "maintenance": false,
        "data-fingerprint": "fc25aa96a3006f0e3547cb9ad9ea1ef2",
        "loglevel": 2,
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "theme": ""
    }
}

Are you using external storage, if yes which one: No

Are you using encryption: yes (but only on external storage)

Are you using an external user-backend, if yes which one: No

Client configuration

Browser: Firefox

Operating system: Ubuntu 18.04

Logs

Web server error log

Web server error log
Not relevant

Nextcloud log (data/nextcloud.log)

Nextcloud log
{
  "reqId": "ogj3OdFrtpjCLdJyv2P9",
  "level": 3,
  "time": "2020-12-13T10:25:01+00:00",
  "remoteAddr": "<remote IP>",
  "user": "myuser",
  "app": "PHP",
  "method": "GET",
  "url": "/ocs/v2.php/apps/notifications/api/v2/notifications",
  "message": {
    "Exception": "Error",
    "Message": "Undefined index: FN at /var/www/html/lib/private/Federation/CloudIdManager.php#89",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/html/lib/private/Federation/CloudIdManager.php",
        "line": 89,
        "function": "onError",
        "class": "OC\\Log\\ErrorHandler",
        "type": "::",
        "args": [
          8,
          "Undefined index: FN",
          "/var/www/html/lib/private/Federation/CloudIdManager.php",
          89,
          {
            "cloudId": "admin@cloud.domainA.org",
            "addressBookEntries": [
              {
                "URI": "Database:admin.vcf",
                "VERSION": "3.0",
                "PRODID": "-//Sabre//Sabre VObject 4.1.6//EN",
                "UID": "admin",
                "PHOTO": "VALUE=uri:https://cloud.domainB.org/remote.php/dav/addressbooks/system/system/<removed id>/Database:admin.vcf?photo",
                "CLOUD": [
                  "admin@cloud.domainA.org"
                ],
                "addressbook-key": 12
              }
            ],
            "entry": {
              "URI": "Database:admin.vcf",
              "VERSION": "3.0",
              "PRODID": "-//Sabre//Sabre VObject 4.1.6//EN",
              "UID": "admin",
              "PHOTO": "VALUE=uri:https://cloud.domainB.org/remote.php/dav/addressbooks/system/system/<removed id>/Database:admin.vcf?photo",
              "CLOUD": [
                "admin@cloud.domainA.org"
              ],
              "addressbook-key": 12
            },
            "cloudID": "admin@cloud.domainA.org"
          }
        ]
      },
      {
        "file": "/var/www/html/lib/private/Federation/CloudIdManager.php",
        "line": 113,
        "function": "getDisplayNameFromContact",
        "class": "OC\\Federation\\CloudIdManager",
        "type": "->",
        "args": [
          "admin@cloud.domainA.org"
        ]
      },
      {
        "file": "/var/www/html/apps/files_sharing/lib/External/MountProvider.php",
        "line": 68,
        "function": "getCloudId",
        "class": "OC\\Federation\\CloudIdManager",
        "type": "->",
        "args": [
          "admin",
          "https://cloud.domainA.org/"
        ]
      },
      {
        "file": "/var/www/html/apps/files_sharing/lib/External/MountProvider.php",
        "line": 85,
        "function": "getMount",
        "class": "OCA\\Files_Sharing\\External\\MountProvider",
        "type": "->",
        "args": [
          {
            "__class__": "OC\\User\\User"
          },
          {
            "remote": "https://cloud.domainA.org/",
            "share_token": "Q2rQFHG3ZN5VwxU",
            "password": "",
            "mountpoint": "/myuser/files/Nextcloud/Infos domainA.org",
            "owner": "admin",
            "manager": {
              "__class__": "OCA\\Files_Sharing\\External\\Manager"
            },
            "token": "Q2rQFHG3ZN5VwxU"
          },
          {
            "__class__": "OC\\Files\\Storage\\StorageFactory"
          }
        ]
      },
      {
        "file": "/var/www/html/lib/private/Files/Config/MountProviderCollection.php",
        "line": 105,
        "function": "getMountsForUser",
        "class": "OCA\\Files_Sharing\\External\\MountProvider",
        "type": "->",
        "args": [
          {
            "__class__": "OC\\User\\User"
          },
          {
            "__class__": "OC\\Files\\Storage\\StorageFactory"
          }
        ]
      },
      {
        "file": "/var/www/html/lib/private/Files/Filesystem.php",
        "line": 451,
        "function": "addMountForUser",
        "class": "OC\\Files\\Config\\MountProviderCollection",
        "type": "->",
        "args": [
          {
            "__class__": "OC\\User\\User"
          },
          {
            "__class__": "OC\\Files\\Mount\\Manager"
          }
        ]
      },
      {
        "file": "/var/www/html/lib/private/Files/Filesystem.php",
        "line": 376,
        "function": "initMountPoints",
        "class": "OC\\Files\\Filesystem",
        "type": "::",
        "args": [
          "myuser"
        ]
      },
      {
        "file": "/var/www/html/lib/private/legacy/OC_Util.php",
        "line": 308,
        "function": "init",
        "class": "OC\\Files\\Filesystem",
        "type": "::",
        "args": [
          "myuser",
          "/myuser/files"
        ]
      },
      {
        "file": "/var/www/html/lib/private/Files/Filesystem.php",
        "line": 354,
        "function": "setupFS",
        "class": "OC_Util",
        "type": "::",
        "args": []
      },
      {
        "file": "/var/www/html/lib/private/Files/View.php",
        "line": 1152,
        "function": "resolvePath",
        "class": "OC\\Files\\Filesystem",
        "type": "::",
        "args": [
          "/files_encryption/OC_DEFAULT_MODULE/pubShare_50369497.publicKey"
        ]
      },
      {
        "file": "/var/www/html/lib/private/Files/View.php",
        "line": 543,
        "function": "basicOperation",
        "class": "OC\\Files\\View",
        "type": "->",
        "args": [
          "file_exists",
          "/files_encryption/OC_DEFAULT_MODULE/pubShare_50369497.publicKey"
        ]
      },
      {
        "file": "/var/www/html/lib/private/Encryption/Keys/Storage.php",
        "line": 211,
        "function": "file_exists",
        "class": "OC\\Files\\View",
        "type": "->",
        "args": [
          "/files_encryption/OC_DEFAULT_MODULE/pubShare_50369497.publicKey"
        ]
      },
      {
        "file": "/var/www/html/lib/private/Encryption/Keys/Storage.php",
        "line": 111,
        "function": "getKey",
        "class": "OC\\Encryption\\Keys\\Storage",
        "type": "->",
        "args": [
          "/files_encryption/OC_DEFAULT_MODULE/pubShare_50369497.publicKey"
        ]
      },
      {
        "file": "/var/www/html/apps/encryption/lib/KeyManager.php",
        "line": 614,
        "function": "getSystemUserKey",
        "class": "OC\\Encryption\\Keys\\Storage",
        "type": "->",
        "args": [
          "pubShare_50369497.publicKey",
          "OC_DEFAULT_MODULE"
        ]
      },
      {
        "file": "/var/www/html/apps/encryption/lib/KeyManager.php",
        "line": 170,
        "function": "getPublicShareKey",
        "class": "OCA\\Encryption\\KeyManager",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/html/apps/encryption/lib/Users/Setup.php",
        "line": 86,
        "function": "validateShareKey",
        "class": "OCA\\Encryption\\KeyManager",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/html/apps/encryption/lib/AppInfo/Application.php",
        "line": 72,
        "function": "setupSystem",
        "class": "OCA\\Encryption\\Users\\Setup",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/html/apps/encryption/appinfo/app.php",
        "line": 37,
        "function": "setUp",
        "class": "OCA\\Encryption\\AppInfo\\Application",
        "type": "->",
        "args": []
      },
      {
        "file": "/var/www/html/lib/private/legacy/OC_App.php",
        "line": 266,
        "args": [
          "/var/www/html/apps/encryption/appinfo/app.php"
        ],
        "function": "require_once"
      },
      {
        "file": "/var/www/html/lib/private/legacy/OC_App.php",
        "line": 155,
        "function": "requireAppFile",
        "class": "OC_App",
        "type": "::",
        "args": [
          {
            "__class__": "OCA\\Encryption\\AppInfo\\Application"
          }
        ]
      },
      {
        "file": "/var/www/html/lib/private/legacy/OC_App.php",
        "line": 128,
        "function": "loadApp",
        "class": "OC_App",
        "type": "::",
        "args": [
          "encryption"
        ]
      },
      {
        "file": "/var/www/html/ocs/v1.php",
        "line": 56,
        "function": "loadApps",
        "class": "OC_App",
        "type": "::",
        "args": []
      },
      {
        "file": "/var/www/html/ocs/v2.php",
        "line": 24,
        "args": [
          "/var/www/html/ocs/v1.php"
        ],
        "function": "require_once"
      }
    ],
    "File": "/var/www/html/lib/private/Log/ErrorHandler.php",
    "Line": 91,
    "CustomMessage": "--"
  },
  "userAgent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:83.0) Gecko/20100101 Firefox/83.0",
  "version": "19.0.6.2"
}

Browser log

Browser log
Not relevant

Activity

  1. added
    0. Needs triagePending check for reproducibility or if it fits our roadmap
    on Dec 13, 2020
  2. added 3 commits that reference this issue on Dec 13, 2020
    72d77fb
    212df7c
    83491c6
  3. JVoorhees46 commented on Dec 13, 2020

    @JVoorhees46

    That seems to solve the problem!!!

  4. added a commit that references this issue on Dec 15, 2020
    4c818e1
  5. added a commit that references this issue on Dec 21, 2020
    a8f60c8
  6. added a commit that references this issue on Dec 28, 2020
    1935993
  7. added a commit that references this issue on Jan 5, 2021
    db04884
  8. added a commit that references this issue on Jan 7, 2021
    3f80249
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    0. Needs triagePending check for reproducibility or if it fits our roadmapbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions