owncloud / core

:cloud: ownCloud web server core (Files, DAV, etc.)
https://owncloud.com
GNU Affero General Public License v3.0
8.4k stars 2.05k forks source link

federation sharing does not work when remote server has capital letters in URL path #35042

Open individual-it opened 5 years ago

individual-it commented 5 years ago

Steps to reproduce

  1. have two instances of oC installed one should have capital case letters in the URL path e.g. http://localhost/owncloud-10.2.0/rc1 and http://localhost/owncloud-10.2.0/RC1_b
  2. try to share federation shares from rc1 to RC1_b

Expected behaviour

sharing works

Actual behaviour

message saying: Sharing Documents failed, could not find admin@http://localhost/owncloud-10.2.0/rc1_b, maybe the server is currently unreachable.

it tries to access rc1_b but the path is RC1_b

Server configuration

Operating system: Ubuntu 18.04 Web server: Apache2 Database: SQlite PHP version: 7.2 ownCloud version: (see ownCloud admin page) 10.2.0.1 Updated from an older ownCloud or fresh install: fresh Where did you install ownCloud from: https://download.owncloud.org/community/testing/owncloud-10.2.0RC1.tar.bz2

The content of config/config.php: rc1

{
    "system": {
        "instanceid": "oczulqjvk0g8",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "172.17.0.1"
        ],
        "datadirectory": "\/home\/artur\/www\/owncloud-10.2.0\/rc1\/data",
        "overwrite.cli.url": "http:\/\/localhost\/owncloud-10.2.0\/rc1",
        "dbtype": "sqlite3",
        "version": "10.2.0.1",
        "logtimezone": "UTC",
        "apps_paths": [
            {
                "path": "\/home\/artur\/www\/owncloud-10.2.0\/rc1\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/home\/artur\/www\/owncloud-10.2.0\/rc1\/apps-external",
                "url": "\/apps-external",
                "writable": true
            }
        ],
        "installed": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "sharing.federation.allowHttpFallback": true
    }
}

RC1_b

{
    "system": {
        "instanceid": "oc5adqzniycz",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "172.17.0.1"
        ],
        "datadirectory": "\/home\/artur\/www\/owncloud-10.2.0\/RC1_b\/data",
        "overwrite.cli.url": "http:\/\/localhost\/owncloud-10.2.0\/RC1_b",
        "dbtype": "sqlite3",
        "version": "10.2.0.1",
        "logtimezone": "UTC",
        "apps_paths": [
            {
                "path": "\/home\/artur\/www\/owncloud-10.2.0\/RC1_b\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/home\/artur\/www\/owncloud-10.2.0\/RC1_b\/apps-external",
                "url": "\/apps-external",
                "writable": true
            }
        ],
        "installed": true,
        "memcache.local": "\\OC\\Memcache\\APCu",
        "sharing.federation.allowHttpFallback": true
    }
}

installed apps

Enabled:
  - comments: 0.3.0
  - configreport: 0.2.0
  - dav: 0.4.0
  - federatedfilesharing: 0.4.0
  - federation: 0.1.0
  - files: 1.5.2
  - files_external: 0.7.1
  - files_sharing: 0.11.0
  - files_trashbin: 0.9.1
  - files_versions: 1.3.0
  - files_videoplayer: 0.10.1
  - firstrunwizard: 1.2.0
  - market: 0.4.0
  - notifications: 0.5.0
  - provisioning_api: 0.5.0
  - systemtags: 0.3.0
  - updatenotification: 0.2.1
Disabled:
  - encryption
  - external
  - user_external

Are you using external storage, if yes which one: local/smb/sftp/... no Are you using encryption: yes/no no Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/... no

Client configuration

Browser: Firefox / Chrome Operating system: Ubuntu 18.04

Logs

ownCloud log (data/owncloud.log)

{"reqId":"byg4JYsIbtOLASSDu4Bd","level":3,"time":"2019-04-17T11:19:16+00:00","remoteAddr":"::1","user":"admin","app":"no app in context","method":"POST","url":"\/owncloud-10.2.0\/rc1\/ocs\/v2.php\/apps\/files_sharing\/api\/v1\/shares?format=json","message":"Failed to notify remote server of federated share, removing share (Sharing Documents failed, could not find admin@http:\/\/localhost\/owncloud-10.2.0\/rc1_b, maybe the server is currently unreachable.)"}
individual-it commented 5 years ago

same problem with 10.1.1