server icon indicating copy to clipboard operation
server copied to clipboard

Public link of files in shared folder stops working after initiator(not owner) removes the folder from his shares.

Open maliskovik opened this issue 7 years ago • 7 comments

Steps to reproduce

  1. User A creates a new directory and shares it with user B
  2. User B shares file(s) in that directory via a public link
  3. user B removes the shared directory.
  4. Anyone tries opening the public link created by user B in the shared directory

Expected behaviour

The shared link of files user B shared should still work. This should work because user B was not the owner of the files. After he removes the shared directory, he only deletes the share with which user A shared the directory with him. The shares he created are properly labeled in the database with the owner being user A and the initiator being user B.

Actual behaviour

Share stops working with the below error. The links starts working again if user A shares the shared directory with user B again.

Server configuration

Operating system: Ubuntu 18.04 Web server: Nginx 1.16 Database: MariaDB 10.1.41 PHP version: PHP 7.1 Nextcloud version: (see Nextcloud admin page) 16.04 Updated from an older Nextcloud/ownCloud or fresh install: Updated from older versions. Initial installation was owncloud - a looong way back. Where did you install Nextcloud from: Manual install from the package on official site. Signing status:

Signing status
No errors have been found.

List of activated apps: Nextcloud configuration:

App list
Enabled:
  - accessibility: 1.2.0
  - activity: 2.9.1
  - admin_audit: 1.6.0
  - bruteforcesettings: 1.4.0
  - circles: 0.17.8
  - cloud_federation_api: 0.2.0
  - comments: 1.6.0
  - dav: 1.9.2
  - federatedfilesharing: 1.6.0
  - federation: 1.6.0
  - files: 1.11.0
  - files_accesscontrol: 1.6.0
  - files_downloadactivity: 1.5.0
  - files_external: 1.7.0
  - files_markdown: 2.1.0
  - files_pdfviewer: 1.5.0
  - files_rightclick: 0.15.1
  - files_sharing: 1.8.0
  - files_texteditor: 2.8.0
  - files_trashbin: 1.6.0
  - files_versions: 1.9.0
  - files_videoplayer: 1.5.0
  - firstrunwizard: 2.5.0
  - gallery: 18.3.0
  - impersonate: 1.3.0
  - logreader: 2.1.0
  - lookup_server_connector: 1.4.0
  - notifications: 2.4.1
  - oauth2: 1.4.2
  - password_policy: 1.6.0
  - privacy: 1.0.0
  - provisioning_api: 1.6.0
  - quota_warning: 1.5.0
  - recommendations: 0.4.0
  - serverinfo: 1.6.0
  - support: 1.0.0
  - survey_client: 1.4.0
  - systemtags: 1.6.0
  - theming: 1.7.0
  - twofactor_backupcodes: 1.5.0
  - updatenotification: 1.6.0
  - user_ldap: 1.6.0
  - user_saml: 2.4.0
  - viewer: 1.1.0
  - workflowengine: 1.6.0
Disabled:
  - encryption
  - nextcloud_announcements
  - sharebymail

Nextcloud configuration:

Config report
{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "cloud.cosylab.com",
            "webmail.cosylab.com"
        ],
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwrite.cli.url": "https:\/\/cloud.cosylab.com\/",
        "dbtype": "mysql",
        "version": "16.0.4.1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "CET",
        "log_type": "owncloud",
        "logfile": "\/var\/log\/nextcloud\/nextcloud.log",
        "installed": true,
        "ldapIgnoreNamingRules": false,
        "preview_libreoffice_path": "\/usr\/bin\/libreoffice",
        "loglevel": 0,
        "log_authfailip": true,
        "log_rotate_size": 104857600,
        "asset-pipeline.enabled": true,
        "memcache.local": "\\OC\\Memcache\\Redis",
        "filelocking.enabled": "true",
        "trashbin_retention_obligation": "auto",
        "versions_retention_obligation": "auto",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "auth.bruteforce.protection.enabled": false,
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0
        },
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpsecure": "tls",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "25",
        "maintenance": false,
        "default_language": "en",
        "theme": "",
        "updatechecker": false,
        "htaccess.RewriteBase": "\/",
        "ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory",
        "updater.release.channel": "production",
        "mysql.utf8mb4": true,
        "debug": true,
        "app_install_overwrite": [
            "circles",
            "defaultgroup"
        ]
    }
}

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/... LDAP(AD), SAML(ADFS)

LDAP configuration (delete this part if not used)

LDAP config
+-------------------------------+---------------------------------------------------------------------+
| Configuration                 | s01                                                                 |
+-------------------------------+---------------------------------------------------------------------+
| hasMemberOfFilterSupport      | 1                                                                   |
| homeFolderNamingRule          |                                                                     |
| lastJpegPhotoLookup           | 0                                                                   |
| ldapAgentName                 | <redacted>                                                          |
| ldapAgentPassword             | ***                                                                 |
| ldapAttributesForGroupSearch  |                                                                     |
| ldapAttributesForUserSearch   | Surname;GivenName                                                   |
| ldapBackupHost                | ldap://<redacted>                                                   |
| ldapBackupPort                | <redacted>                                                          |
| ldapBase                      | <redacted>                                                          |
| ldapBaseGroups                | <redacted>                                                          |
| ldapBaseUsers                 | <redacted>                                                          |
| ldapCacheTTL                  | 600                                                                 |
| ldapConfigurationActive       | 1                                                                   |
| ldapDefaultPPolicyDN          |                                                                     |
| ldapDynamicGroupMemberURL     |                                                                     |
| ldapEmailAttribute            | mail                                                                |
| ldapExperiencedAdmin          | 0                                                                   |
| ldapExpertUUIDGroupAttr       |                                                                     |
| ldapExpertUUIDUserAttr        |                                                                     |
| ldapExpertUsernameAttr        | sAMAccountName                                                      |
| ldapExtStorageHomeAttribute   |                                                                     |
| ldapGidNumber                 | gidNumber                                                           |
| ldapGroupDisplayName          | cn                                                                  |
| ldapGroupFilter               | <redacted>                                                          |
| ldapGroupFilterGroups         | <redacted>                                                          |
| ldapGroupFilterMode           | 0                                                                   |
| ldapGroupFilterObjectclass    | group                                                               |
| ldapGroupMemberAssocAttr      | member                                                              |
| ldapHost                      | <redacted>                                                          |
| ldapIgnoreNamingRules         |                                                                     |
| ldapLoginFilter               | (&(&(|(objectclass=person)))(sAMAccountName=%uid))                  |
| ldapLoginFilterAttributes     |                                                                     |
| ldapLoginFilterEmail          | 0                                                                   |
| ldapLoginFilterMode           | 1                                                                   |
| ldapLoginFilterUsername       | 1                                                                   |
| ldapNestedGroups              | 1                                                                   |
| ldapOverrideMainServer        |                                                                     |
| ldapPagingSize                | 500                                                                 |
| ldapPort                      | 389                                                                 |
| ldapQuotaAttribute            | pager                                                               |
| ldapQuotaDefault              | 5G                                                                  |
| ldapTLS                       | 0                                                                   |
| ldapUserAvatarRule            | default                                                             |
| ldapUserDisplayName           | sAMAccountName                                                      |
| ldapUserDisplayName2          |                                                                     |
| ldapUserFilter                | (&(|(objectclass=person)))                                          |
| ldapUserFilterGroups          |                                                                     |
| ldapUserFilterMode            | 0                                                                   |
| ldapUserFilterObjectclass     | person                                                              |
| ldapUuidGroupAttribute        | auto                                                                |
| ldapUuidUserAttribute         | auto                                                                |
| turnOffCertCheck              | 1                                                                   |
| turnOnPasswordChange          | 0                                                                   |
| useMemberOfToDetectMembership | 1                                                                   |
+-------------------------------+---------------------------------------------------------------------+

Client configuration

Browser: Chrome/Firefox Operating system: Linux/Windows

Logs

Web server error log

Web server error log
<CLIENT IP> - - [17/Oct/2019:07:48:48 +0200] "GET /s/f2tpSnbQWc72fYA/download HTTP/1.0" 500 6913 "https://cloud.cosylab.com/s/f2tpSnbQWc72fYA" "Mozilla/5.0 (X11; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
<CLIENT IP> - - [17/Oct/2019:07:48:48 +0200] "GET /apps/accessibility/js/accessibility?v=0 HTTP/1.0" 200 65 "https://cloud.cosylab.com/s/f2tpSnbQWc72fYA/download" "Mozilla/5.0 (X11; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
<CLIENT IP> - - [17/Oct/2019:07:48:48 +0200] "GET /apps/theming/js/theming?v=43 HTTP/1.0" 200 242 "https://cloud.cosylab.com/s/f2tpSnbQWc72fYA/download" "Mozilla/5.0 (X11; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
<CLIENT IP> - - [17/Oct/2019:07:48:48 +0200] "GET /apps/theming/styles?v=43 HTTP/1.0" 304 0 "https://cloud.cosylab.com/s/f2tpSnbQWc72fYA/download" "Mozilla/5.0 (X11; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
<CLIENT IP> - - [17/Oct/2019:07:48:48 +0200] "GET /apps/theming/image/logo?useSvg=1&v=43 HTTP/1.0" 304 0 "https://cloud.cosylab.com/s/f2tpSnbQWc72fYA/download" "Mozilla/5.0 (X11; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
<CLIENT IP> - - [17/Oct/2019:07:48:48 +0200] "GET /apps/theming/image/logo?v=43 HTTP/1.0" 304 0 "https://cloud.cosylab.com/apps/theming/styles?v=43" "Mozilla/5.0 (X11; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
<CLIENT IP> - - [17/Oct/2019:07:48:48 +0200] "GET /apps/theming/image/background?v=43 HTTP/1.0" 304 0 "https://cloud.cosylab.com/apps/theming/styles?v=43" "Mozilla/5.0 (X11; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"

Nextcloud log (data/nextcloud.log)

Nextcloud log
{"reqId":"FDmt83YN77557DoBeyrd","level":0,"time":"2019-10-17T06:46:40+01:00","remoteAddr":"10.75.0.7","user":"--","app":"PHP","method":"GET","url":"\/s\/f2tpSnbQWc72fYA\/download","message":"Undefined offset: 0 at \/var\/www\/nextcloud\/apps\/files_sharing\/lib\/Controller\/ShareController.php#636","userAgent":"Mozilla\/5.0 (X11; Linux x86_64; rv:69.0) Gecko\/20100101 Firefox\/69.0","version":"16.0.4.1"}
{"reqId":"FDmt83YN77557DoBeyrd","level":3,"time":"2019-10-17T06:46:40+01:00","remoteAddr":"10.75.0.7","user":"--","app":"index","method":"GET","url":"\/s\/f2tpSnbQWc72fYA\/download","message":{"Exception":"Error","Message":"Call to a member function getPath() on null","Code":0,"Trace":[{"file":"\/var\/www\/nextcloud\/apps\/files_sharing\/lib\/Controller\/ShareController.php","line":538,"function":"singleFileDownloaded","class":"OCA\\Files_Sharing\\Controller\\ShareController","type":"->","args":[{"__class__":"OC\\Share20\\Share"},{"__class__":"OC\\Files\\Node\\File"}]},{"file":"\/var\/www\/nextcloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":166,"function":"downloadShare","class":"OCA\\Files_Sharing\\Controller\\ShareController","type":"->","args":["f2tpSnbQWc72fYA",null,"",""]},{"file":"\/var\/www\/nextcloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":99,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Files_Sharing\\Controller\\ShareController"},"downloadShare"]},{"file":"\/var\/www\/nextcloud\/lib\/private\/AppFramework\/App.php","line":126,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Files_Sharing\\Controller\\ShareController"},"downloadShare"]},{"file":"\/var\/www\/nextcloud\/lib\/private\/AppFramework\/Routing\/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Files_Sharing\\Controller\\ShareController","downloadShare",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"token":"f2tpSnbQWc72fYA","_route":"files_sharing.sharecontroller.downloadShare"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"token":"f2tpSnbQWc72fYA","_route":"files_sharing.sharecontroller.downloadShare"}]},{"file":"\/var\/www\/nextcloud\/lib\/private\/Route\/Router.php","line":297,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"token":"f2tpSnbQWc72fYA","_route":"files_sharing.sharecontroller.downloadShare"}]},{"file":"\/var\/www\/nextcloud\/lib\/base.php","line":975,"function":"match","class":"OC\\Route\\Router","type":"->","args":["\/s\/f2tpSnbQWc72fYA\/download"]},{"file":"\/var\/www\/nextcloud\/index.php","line":42,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"\/var\/www\/nextcloud\/apps\/files_sharing\/lib\/Controller\/ShareController.php","Line":638,"CustomMessage":"--"},"userAgent":"Mozilla\/5.0 (X11; Linux x86_64; rv:69.0) Gecko\/20100101 Firefox\/69.0","version":"16.0.4.1"}

Browser log

Browser log
GEThttps://cloud.cosylab.com/s/f2tpSnbQWc72fYA/download
[HTTP/2.0 500 Internal Server Error 61ms]

GEThttps://cloud.cosylab.com/apps/files_pdfviewer/css/style.css
[HTTP/2.0 304 Not Modified 3ms]

GEThttps://cloud.cosylab.com/core/css/guest.css
[HTTP/2.0 304 Not Modified 3ms]

GEThttps://cloud.cosylab.com/core/js/dist/main.js
[HTTP/2.0 304 Not Modified 3ms]

GEThttps://cloud.cosylab.com/core/js/oc-dialogs.js
[HTTP/2.0 304 Not Modified 3ms]

GEThttps://cloud.cosylab.com/core/js/js.js
[HTTP/2.0 304 Not Modified 3ms]

GEThttps://cloud.cosylab.com/core/js/oc-requesttoken.js
[HTTP/2.0 304 Not Modified 3ms]

GEThttps://cloud.cosylab.com/core/js/mimetype.js
[HTTP/2.0 304 Not Modified 3ms]

GEThttps://cloud.cosylab.com/core/js/mimetypelist.js
[HTTP/2.0 304 Not Modified 2ms]

GEThttps://cloud.cosylab.com/core/js/select2-toggleselect.js
[HTTP/2.0 304 Not Modified 2ms]

GEThttps://cloud.cosylab.com/core/search/js/search.js
[HTTP/2.0 304 Not Modified 2ms]

GEThttps://cloud.cosylab.com/apps/files_pdfviewer/js/previewplugin.js
[HTTP/2.0 304 Not Modified 3ms]

GEThttps://cloud.cosylab.com/core/js/dist/share_backend.js
[HTTP/2.0 304 Not Modified 3ms]

GEThttps://cloud.cosylab.com/apps/files_videoplayer/js/main.js
[HTTP/2.0 304 Not Modified 3ms]

GEThttps://cloud.cosylab.com/core/search/js/searchprovider.js
[HTTP/2.0 304 Not Modified 3ms]

GEThttps://cloud.cosylab.com/core/js/files/fileinfo.js
[HTTP/2.0 304 Not Modified 3ms]

GEThttps://cloud.cosylab.com/core/js/files/client.js
[HTTP/2.0 304 Not Modified 3ms]

GEThttps://cloud.cosylab.com/apps/theming/styles?v=43
[HTTP/2.0 304 Not Modified 43ms]

GEThttps://cloud.cosylab.com/apps/accessibility/js/accessibility?v=0
[HTTP/2.0 200 OK 41ms]

GEThttps://cloud.cosylab.com/apps/theming/js/theming?v=43
[HTTP/2.0 200 OK 58ms]

GEThttps://cloud.cosylab.com/apps/theming/image/logo?useSvg=1&v=43
[HTTP/2.0 304 Not Modified 79ms]

Unknown property ‘text-decoration-skip-ink’.  Declaration dropped. guest.css:43:27
JQMIGRATE: Migrate is installed, version 1.4.1 main.js:278:531
Expected ‘none’, URL, or filter function but found ‘Alpha(’.  Error in parsing value for ‘filter’.  Declaration dropped. download:48:9
Expected ‘none’, URL, or filter function but found ‘alpha(’.  Error in parsing value for ‘filter’.  Declaration dropped. download:667:10
Expected ‘none’, URL, or filter function but found ‘Alpha(’.  Error in parsing value for ‘filter’.  Declaration dropped. download:1044:9
Expected ‘none’, URL, or filter function but found ‘Alpha(’.  Error in parsing value for ‘filter’.  Declaration dropped. download:1051:9
Expected ‘none’, URL, or filter function but found ‘Alpha(’.  Error in parsing value for ‘filter’.  Declaration dropped. download:1055:9
Expected ‘none’, URL, or filter function but found ‘Alpha(’.  Error in parsing value for ‘filter’.  Declaration dropped. download:1307:10
Expected ‘none’, URL, or filter function but found ‘Alpha(’.  Error in parsing value for ‘filter’.  Declaration dropped. download:175:9
Expected ‘none’, URL, or filter function but found ‘Alpha(’.  Error in parsing value for ‘filter’.  Declaration dropped. download:182:9
Expected ‘none’, URL, or filter function but found ‘Alpha(’.  Error in parsing value for ‘filter’.  Declaration dropped. download:186:9
Expected ‘none’, URL, or filter function but found ‘Alpha(’.  Error in parsing value for ‘filter’.  Declaration dropped. download:438:10
Expected ‘none’, URL, or filter function but found ‘alpha(’.  Error in parsing value for ‘filter’.  Declaration dropped. download:132:11
Unknown property ‘-moz-border-radius’.  Declaration dropped. download:136:22
Expected ‘none’, URL, or filter function but found ‘alpha(’.  Error in parsing value for ‘filter’.  Declaration dropped. download:146:11
Unknown property ‘-moz-border-radius’.  Declaration dropped. download:150:22
Unknown property ‘zoom’.  Declaration dropped. download:9:10
Expected declaration but found ‘*’.  Skipped to next declaration. download:10:5
Expected ‘none’, URL, or filter function but found ‘progid’.  Error in parsing value for ‘filter’.  Declaration dropped. download:55:13
Expected ‘none’, URL, or filter function but found ‘progid’.  Error in parsing value for ‘filter’.  Declaration dropped. download:67:13
Expected ‘none’, URL, or filter function but found ‘alpha(’.  Error in parsing value for ‘filter’.  Declaration dropped. download:128:13
Expected ‘none’, URL, or filter function but found ‘progid’.  Error in parsing value for ‘filter’.  Declaration dropped. download:195:13
Expected ‘none’, URL, or filter function but found ‘progid’.  Error in parsing value for ‘filter’.  Declaration dropped. download:277:13
Expected ‘none’, URL, or filter function but found ‘progid’.  Error in parsing value for ‘filter’.  Declaration dropped. download:289:13
Expected ‘none’, URL, or filter function but found ‘progid’.  Error in parsing value for ‘filter’.  Declaration dropped. download:532:13
Expected ‘none’, URL, or filter function but found ‘alpha(’.  Error in parsing value for ‘filter’.  Declaration dropped. download:15:10
ReferenceError: oc_appconfig is not defined
share_backend.js:1:1128
TypeError: link is undefined
js.js:175:7
GEThttps://cloud.cosylab.com/apps/theming/image/background?v=43
[HTTP/2.0 304 Not Modified 64ms]

GEThttps://cloud.cosylab.com/apps/theming/image/logo?v=43
[HTTP/2.0 304 Not Modified 40ms]

GEThttps://cloud.cosylab.com/core/img/favicon-touch.png
[HTTP/2.0 200 OK 0ms]

GEThttps://cloud.cosylab.com/core/img/favicon.ico
[HTTP/2.0 200 OK 0ms]

Source map error: TypeError: NetworkError when attempting to fetch resource.
Resource URL: https://cloud.cosylab.com/core/js/dist/share_backend.js
Source Map URL: share_backend.js.map

Source map error: TypeError: NetworkError when attempting to fetch resource.
Resource URL: https://cloud.cosylab.com/core/js/dist/main.js
Source Map URL: main.js.map

{
  "log": {
    "version": "1.2",
    "creator": {
      "name": "Firefox",
      "version": "69.0.3"
    },
    "browser": {
      "name": "Firefox",
      "version": "69.0.3"
    },
    "pages": [
      {
        "startedDateTime": "2019-10-17T07:54:35.411+02:00",
        "id": "page_1",
        "pageTimings": {
          "onContentLoad": 242,
          "onLoad": 693
        }
      }
    ],
    "entries": [
      {
        "pageref": "page_1",
        "startedDateTime": "2019-10-17T07:54:35.411+02:00",
        "request": {
          "bodySize": 0,
          "method": "GET",
          "url": "https://cloud.cosylab.com/s/f2tpSnbQWc72fYA/download",
          "httpVersion": "HTTP/2.0",
          "headers": [
            {
              "name": "Host",
              "value": "cloud.cosylab.com"
            },
            {
              "name": "User-Agent",
              "value": "Mozilla/5.0 (X11; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0"
            },
            {
              "name": "Accept",
              "value": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"
            },
            {
              "name": "Accept-Language",
              "value": "en-US,en;q=0.5"
            },
            {
              "name": "Accept-Encoding",
              "value": "gzip, deflate, br"
            },
            {
              "name": "Referer",
              "value": "https://cloud.cosylab.com/s/f2tpSnbQWc72fYA"
            },
            {
              "name": "Connection",
              "value": "keep-alive"
            },
            {
              "name": "Cookie",
              "value": "__Host-nc_sameSiteCookielax=true; __Host-nc_sameSiteCookiestrict=true; _ga=GA1.2.1696215851.1557297096; _gid=GA1.2.1640817260.1571027241; ocmkdjtiio8l=bm2pnsmjchnah6nqg2g97ta4ea; oc_sessionPassphrase=%2FnbJsl9yftHKDj%2F0RXsztCgGgYDq4nusl5LxW3YaEI%2F16b3WQSwxLZlpd7ADThJ%2FWWVfxWwNc0f74M%2Bv0Z3hJKZ3drzOdmM%2B6eC908kElJxgM2AMM%2FFiM9ICpDR5%2FPsQ"
            },
            {
              "name": "Upgrade-Insecure-Requests",
              "value": "1"
            },
            {
              "name": "Cache-Control",
              "value": "max-age=0"
            },
            {
              "name": "TE",
              "value": "Trailers"
            }
          ],
          "cookies": [
            {
              "name": "__Host-nc_sameSiteCookielax",
              "value": "true"
            },
            {
              "name": "__Host-nc_sameSiteCookiestrict",
              "value": "true"
            },
            {
              "name": "_ga",
              "value": "GA1.2.1696215851.1557297096"
            },
            {
              "name": "_gid",
              "value": "GA1.2.1640817260.1571027241"
            },
            {
              "name": "ocmkdjtiio8l",
              "value": "bm2pnsmjchnah6nqg2g97ta4ea"
            },
            {
              "name": "oc_sessionPassphrase",
              "value": "/nbJsl9yftHKDj/0RXsztCgGgYDq4nusl5LxW3YaEI/16b3WQSwxLZlpd7ADThJ/WWVfxWwNc0f74M+v0Z3hJKZ3drzOdmM+6eC908kElJxgM2AMM/FiM9ICpDR5/PsQ"
            }
          ],
          "queryString": [],
          "headersSize": 781
        },
        "response": {
          "status": 500,
          "statusText": "Internal Server Error",
          "httpVersion": "HTTP/2.0",
          "headers": [
            {
              "name": "date",
              "value": "Thu, 17 Oct 2019 05:54:35 GMT"
            },
            {
              "name": "content-type",
              "value": "text/html; charset=UTF-8"
            },
            {
              "name": "server",
              "value": "nginx"
            },
            {
              "name": "expires",
              "value": "Thu, 19 Nov 1981 08:52:00 GMT"
            },
            {
              "name": "cache-control",
              "value": "no-store, no-cache, must-revalidate"
            },
            {
              "name": "pragma",
              "value": "no-cache"
            },
            {
              "name": "content-security-policy",
              "value": "default-src 'self'; script-src 'self' 'nonce-UTQ5T2IyWXlPSTR1dk1sN3VhS1pxd0N5RCtHWlViMVNISjBBb3prOHR4MD06TE5rWk55SkhUZXA5aTdBb3daYnkzM0w1VHB2dUM5a3pTZmd5em01Risxcz0='; style-src 'self' 'unsafe-inline'; frame-src *; img-src * data: blob:; font-src 'self' data:; media-src *; connect-src *; object-src 'none'; base-uri 'self';"
            },
            {
              "name": "X-Firefox-Spdy",
              "value": "h2"
            }
          ],
          "cookies": [],
          "content": {
            "mimeType": "text/html; charset=UTF-8",
            "size": 6913,
            "text": "<!DOCTYPE html>\n<html class=\"ng-csp\" data-placeholder-focus=\"false\" lang=\"en\" data-locale=\"en\" >\n\t<head\n data-requesttoken=\"\">\n\t\t<meta charset=\"utf-8\">\n\t\t<title>\n\t\tCosylab Cloud\t\t</title>\n\t\t<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, minimum-scale=1.0\">\n\t\t<meta name=\"apple-itunes-app\" content=\"app-id=1125420102\">\n\t\t<meta name=\"theme-color\" content=\"#A1A1A1\">\n\t\t<link rel=\"icon\" href=\"/core/img/favicon.ico\">\n\t\t<link rel=\"apple-touch-icon-precomposed\" href=\"/core/img/favicon-touch.png\">\n\t\t<link rel=\"mask-icon\" sizes=\"any\" href=\"/core/img/favicon-mask.svg\" color=\"#A1A1A1\">\n\t\t<link rel=\"manifest\" href=\"/apps/theming/manifest?v=43\">\n\t\t<link rel=\"stylesheet\" href=\"/apps/files_pdfviewer/css/style.css\">\n<link rel=\"stylesheet\" href=\"/core/css/guest.css\">\n\t\t<script nonce=\"UTQ5T2IyWXlPSTR1dk1sN3VhS1pxd0N5RCtHWlViMVNISjBBb3prOHR4MD06TE5rWk55SkhUZXA5aTdBb3daYnkzM0w1VHB2dUM5a3pTZmd5em01Risxcz0=\" defer src=\"/core/js/dist/main.js\"></script>\n<script nonce=\"UTQ5T2IyWXlPSTR1dk1sN3VhS1pxd0N5RCtHWlViMVNISjBBb3prOHR4MD06TE5rWk55SkhUZXA5aTdBb3daYnkzM0w1VHB2dUM5a3pTZmd5em01Risxcz0=\" defer src=\"/core/js/oc-dialogs.js\"></script>\n<script nonce=\"UTQ5T2IyWXlPSTR1dk1sN3VhS1pxd0N5RCtHWlViMVNISjBBb3prOHR4MD06TE5rWk55SkhUZXA5aTdBb3daYnkzM0w1VHB2dUM5a3pTZmd5em01Risxcz0=\" defer src=\"/core/js/js.js\"></script>\n<script nonce=\"UTQ5T2IyWXlPSTR1dk1sN3VhS1pxd0N5RCtHWlViMVNISjBBb3prOHR4MD06TE5rWk55SkhUZXA5aTdBb3daYnkzM0w1VHB2dUM5a3pTZmd5em01Risxcz0=\" defer src=\"/core/js/oc-requesttoken.js\"></script>\n<script nonce=\"UTQ5T2IyWXlPSTR1dk1sN3VhS1pxd0N5RCtHWlViMVNISjBBb3prOHR4MD06TE5rWk55SkhUZXA5aTdBb3daYnkzM0w1VHB2dUM5a3pTZmd5em01Risxcz0=\" defer src=\"/core/js/mimetype.js\"></script>\n<script nonce=\"UTQ5T2IyWXlPSTR1dk1sN3VhS1pxd0N5RCtHWlViMVNISjBBb3prOHR4MD06TE5rWk55SkhUZXA5aTdBb3daYnkzM0w1VHB2dUM5a3pTZmd5em01Risxcz0=\" defer src=\"/core/js/mimetypelist.js\"></script>\n<script nonce=\"UTQ5T2IyWXlPSTR1dk1sN3VhS1pxd0N5RCtHWlViMVNISjBBb3prOHR4MD06TE5rWk55SkhUZXA5aTdBb3daYnkzM0w1VHB2dUM5a3pTZmd5em01Risxcz0=\" defer src=\"/core/js/select2-toggleselect.js\"></script>\n<script nonce=\"UTQ5T2IyWXlPSTR1dk1sN3VhS1pxd0N5RCtHWlViMVNISjBBb3prOHR4MD06TE5rWk55SkhUZXA5aTdBb3daYnkzM0w1VHB2dUM5a3pTZmd5em01Risxcz0=\" defer src=\"/core/search/js/search.js\"></script>\n<script nonce=\"UTQ5T2IyWXlPSTR1dk1sN3VhS1pxd0N5RCtHWlViMVNISjBBb3prOHR4MD06TE5rWk55SkhUZXA5aTdBb3daYnkzM0w1VHB2dUM5a3pTZmd5em01Risxcz0=\" defer src=\"/apps/files_pdfviewer/js/previewplugin.js\"></script>\n<script nonce=\"UTQ5T2IyWXlPSTR1dk1sN3VhS1pxd0N5RCtHWlViMVNISjBBb3prOHR4MD06TE5rWk55SkhUZXA5aTdBb3daYnkzM0w1VHB2dUM5a3pTZmd5em01Risxcz0=\" defer src=\"/core/js/dist/share_backend.js\"></script>\n<script nonce=\"UTQ5T2IyWXlPSTR1dk1sN3VhS1pxd0N5RCtHWlViMVNISjBBb3prOHR4MD06TE5rWk55SkhUZXA5aTdBb3daYnkzM0w1VHB2dUM5a3pTZmd5em01Risxcz0=\" defer src=\"/apps/files_videoplayer/js/main.js\"></script>\n<script nonce=\"UTQ5T2IyWXlPSTR1dk1sN3VhS1pxd0N5RCtHWlViMVNISjBBb3prOHR4MD06TE5rWk55SkhUZXA5aTdBb3daYnkzM0w1VHB2dUM5a3pTZmd5em01Risxcz0=\" defer src=\"/core/search/js/searchprovider.js\"></script>\n<script nonce=\"UTQ5T2IyWXlPSTR1dk1sN3VhS1pxd0N5RCtHWlViMVNISjBBb3prOHR4MD06TE5rWk55SkhUZXA5aTdBb3daYnkzM0w1VHB2dUM5a3pTZmd5em01Risxcz0=\" defer src=\"/core/js/files/fileinfo.js\"></script>\n<script nonce=\"UTQ5T2IyWXlPSTR1dk1sN3VhS1pxd0N5RCtHWlViMVNISjBBb3prOHR4MD06TE5rWk55SkhUZXA5aTdBb3daYnkzM0w1VHB2dUM5a3pTZmd5em01Risxcz0=\" defer src=\"/core/js/files/client.js\"></script>\n\t\t<script defer src=\"/apps/accessibility/js/accessibility?v=0\" nonce=\"UTQ5T2IyWXlPSTR1dk1sN3VhS1pxd0N5RCtHWlViMVNISjBBb3prOHR4MD06TE5rWk55SkhUZXA5aTdBb3daYnkzM0w1VHB2dUM5a3pTZmd5em01Risxcz0=\"></script><link rel=\"stylesheet\" href=\"/apps/theming/styles?v=43\"/><script defer src=\"/apps/theming/js/theming?v=43\" nonce=\"UTQ5T2IyWXlPSTR1dk1sN3VhS1pxd0N5RCtHWlViMVNISjBBb3prOHR4MD06TE5rWk55SkhUZXA5aTdBb3daYnkzM0w1VHB2dUM5a3pTZmd5em01Risxcz0=\"></script>\t</head>\n\t<body id=\"body-login\">\n\t\t<noscript>\n\t<div id=\"nojavascript\">\n\t\t<div>\n\t\t\tThis application requires JavaScript for correct operation. Please <a href=\"https://www.enable-javascript.com/\" target=\"_blank\" rel=\"noreferrer noopener\">enable JavaScript</a> and reload the page.\t\t</div>\n\t</div>\n</noscript>\n\t\t\t\t<div class=\"wrapper\">\n\t\t\t<div class=\"v-align\">\n\t\t\t\t\t\t\t\t\t<header role=\"banner\">\n\t\t\t\t\t\t<div id=\"header\">\n\t\t\t\t\t\t\t<div class=\"logo\">\n\t\t\t\t\t\t\t\t<h1 class=\"hidden-visually\">\n\t\t\t\t\t\t\t\t\tCosylab Cloud\t\t\t\t\t\t\t\t</h1>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img src=\"/apps/theming/image/logo?useSvg=1&amp;v=43\"/>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</header>\n\t\t\t\t\t\t\t\t<main>\n\t\t\t\t\t<div class=\"error error-wide\">\n\t<h2>Internal Server Error</h2>\n\t<p>The server was unable to complete your request.</p>\n\t<p>If this happens again, please send the technical details below to the server administrator.</p>\n\t<p>More details can be found in the server log.</p>\n\n\t<h3>Technical details</h3>\n\t<ul>\n\t\t<li>Remote Address: 10.75.0.7</li>\n\t\t<li>Request ID: vxeMPHy10DKEtO2vrF07</li>\n\t\t\t\t\t<li>Type: Error</li>\n\t\t\t<li>Code: 0</li>\n\t\t\t<li>Message: Call to a member function getPath() on null</li>\n\t\t\t<li>File: /var/www/nextcloud/apps/files_sharing/lib/Controller/ShareController.php</li>\n\t\t\t<li>Line: 638</li>\n\t\t\t</ul>\n\n\t\t\t<br />\n\t\t<h3>Trace</h3>\n\t\t<pre>#0 /var/www/nextcloud/apps/files_sharing/lib/Controller/ShareController.php(538): OCA\\Files_Sharing\\Controller\\ShareController-&gt;singleFileDownloaded(Object(OC\\Share20\\Share), Object(OC\\Files\\Node\\File))\n#1 /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(166): OCA\\Files_Sharing\\Controller\\ShareController-&gt;downloadShare(&#039;f2tpSnbQWc72fYA&#039;, NULL, &#039;&#039;, &#039;&#039;)\n#2 /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php(99): OC\\AppFramework\\Http\\Dispatcher-&gt;executeController(Object(OCA\\Files_Sharing\\Controller\\ShareController), &#039;downloadShare&#039;)\n#3 /var/www/nextcloud/lib/private/AppFramework/App.php(126): OC\\AppFramework\\Http\\Dispatcher-&gt;dispatch(Object(OCA\\Files_Sharing\\Controller\\ShareController), &#039;downloadShare&#039;)\n#4 /var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php(47): OC\\AppFramework\\App::main(&#039;OCA\\\\Files_Shari...&#039;, &#039;downloadShare&#039;, Object(OC\\AppFramework\\DependencyInjection\\DIContainer), Array)\n#5 [internal function]: OC\\AppFramework\\Routing\\RouteActionHandler-&gt;__invoke(Array)\n#6 /var/www/nextcloud/lib/private/Route/Router.php(297): call_user_func(Object(OC\\AppFramework\\Routing\\RouteActionHandler), Array)\n#7 /var/www/nextcloud/lib/base.php(975): OC\\Route\\Router-&gt;match(&#039;/s/f2tpSnbQWc72...&#039;)\n#8 /var/www/nextcloud/index.php(42): OC::handleRequest()\n#9 {main}</pre>\n\t</div>\n\t\t\t\t</main>\n\t\t\t</div>\n\t\t</div>\n\t\t<footer role=\"contentinfo\">\n\t\t\t<p class=\"info\">\n\t\t\t\t<a href=\"https://nextcloud.com\" target=\"_blank\" rel=\"noreferrer noopener\" class=\"entity-name\">Cosylab Cloud</a> – Your trusted control system partner\t\t\t</p>\n\t\t</footer>\n\t</body>\n</html>\n"
          },
          "redirectURL": "",
          "headersSize": 611,
          "bodySize": 7524
        },
        "cache": {},
        "timings": {
          "blocked": 0,
          "dns": 0,
          "connect": 0,
          "ssl": 0,
          "send": 0,
          "wait": 186,
          "receive": 0
        },
        "time": 186,
        "_securityState": "secure",
        "serverIPAddress": "10.48.0.20",
        "connection": "443"
      }
    ]
  }
}

maliskovik avatar Oct 17 '19 05:10 maliskovik

Sorry but, for me it looks correct or, I misunderstand you.

Re-cap:

  1. A shares directory a as ab with B
  2. B creates a public share abp on share ab where A is owner
  3. B deletes abp, abp is no longer available. He can't delete directory a .

Looks fine for me.

dirigit avatar Oct 17 '19 06:10 dirigit

3: B removes the directory ab from his shares. The directory ab still exists with his owner(A). Share abp is not deleted. In fact it starts working again if user A shares ab with B again.

maliskovik avatar Oct 17 '19 06:10 maliskovik

This would be false behaviour IMHO.

Correct behaviour should be: B removes share ab therefore all his further shares abp should be removed from ab as long as A doesn't get ownership.

Files are another kind of animal.

Add: Handling files can be very complicated in some situations. Take a company and B changing department from X to Y and no further access to data from department X as example. Data produced for X should be available further on but, further shares of those data should be confirmed by X (user A in this example).

dirigit avatar Oct 17 '19 06:10 dirigit

How I look at it, the owner of shares(and files) is set correctly - the owner is A - as seen in the database. B is only the initiator. Thus it makes sense that shares stay after ab is no longer shared with B.

To present this with a practical example: Let's say the project owner shares a directory that contains documentation and related files with team members. They upload files to it and share them, probably also including links to shares in documentation. When a member stops working on a project, he is removed from the shared directory. The share links though should remain working as they could be used by others via documentation, or other methods this links were shared.

maliskovik avatar Oct 17 '19 06:10 maliskovik

See edit above, please. It's really no fun do get it correct.

dirigit avatar Oct 17 '19 06:10 dirigit

The only problem I see is why the error appears instead of file being served. Other than that it looks ok(database-wise).

maliskovik avatar Oct 17 '19 07:10 maliskovik

For me it looks like what your are describing is working as it was intended.

szaimen avatar Jun 07 '21 16:06 szaimen