Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File link in notifications seems to not work #5227

Closed
saw-jan opened this issue Jun 10, 2021 · 8 comments · Fixed by #6955
Closed

File link in notifications seems to not work #5227

saw-jan opened this issue Jun 10, 2021 · 8 comments · Fixed by #6955
Labels
Priority:p3-medium Normal priority

Comments

@saw-jan
Copy link
Member

saw-jan commented Jun 10, 2021

Steps to reproduce

[enable notification app]
[as Brian disable auto-accept-share]

  1. Create users Alice and Brian
  2. Login as Alice, create folder TOSHARE and share it with Brian
  3. Login as Brian, follow the link from notifications dropdown

Expected behaviour

Actual behaviour

noti01
noti02

Server configuration

Operating system: Ubuntu 20.04
Web server: Apache
Database: MySQL
PHP version: 7.4

ownCloud version: 10.8.0 prealpha (git)

@individual-it
Copy link
Member

is that the case for all private links for you or just when you navigate from the notification?

@pascalwengerter
Copy link
Contributor

Could you please re-try with the latest web master? We merged a big PR today and I remember fixing the tests for this the other day and just tried myself, see screenshot below:

Screenshot 2021-06-10 at 20 53 37

@saw-jan
Copy link
Member Author

saw-jan commented Jun 16, 2021

I still get the same link with latest web and latest core
sharenoti

oC10 running on: http://localhost/core
web: http://localhost:9100

@individual-it
Copy link
Member

@saw-jan can you paste your core configuration (output of sudo -u www-data ./occ config:list)

@saw-jan
Copy link
Member Author

saw-jan commented Jun 16, 2021

Yeah,

{
    "system": {
        "instanceid": "ocjhxqg8fllg",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "172.17.0.1"
        ],
        "datadirectory": "\/mnt\/sda1\/www\/core\/data",
        "overwrite.cli.url": "http:\/\/localhost\/core",
        "dbtype": "mysql",
        "version": "10.8.0.0",
        "dbname": "owncloud",
        "dbhost": "localhost",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "logtimezone": "UTC",
        "apps_paths": [
            {
                "path": "\/mnt\/sda1\/www\/core\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/mnt\/sda1\/www\/core\/apps-external",
                "url": "\/apps-external",
                "writable": true
            }
        ],
        "installed": true,
        "htaccess.RewriteBase": "\/core\/",
        "csrf.disabled": true,
        "enable_previews": false,
        "theme": "",
        "loglevel": 2,
        "maintenance": false,
        "cors.allowed-domains": [
            "http:\/\/localhost:9100"
        ],
        "log_type": "owncloud",
        "web.rewriteLinks": true,
        "web.baseUrl": "http:\/\/localhost:9100"
    },
    "apps": {
        "backgroundjob": {
            "lastjob": "650"
        },
        "comments": {
            "enabled": "yes",
            "installed_version": "0.3.0",
            "types": "logging,dav"
        },
        "core": {
            "first_install_version": "10.7.1.0",
            "installedat": "1621333013.807",
            "lastcron": "1623817736",
            "lastupdateResult": "[]",
            "lastupdatedat": "1623816746",
            "oc.integritycheck.checker": "{\"notifications\":{\"EXCEPTION\":{\"class\":\"OC\\\\IntegrityCheck\\\\Exceptions\\\\MissingSignatureException\",\"message\":\"Signature data not found.\"}},\"systemtags\":{\"EXCEPTION\":{\"class\":\"OC\\\\IntegrityCheck\\\\Exceptions\\\\MissingSignatureException\",\"message\":\"Signature data not found.\"}},\"oauth2\":{\"EXCEPTION\":{\"class\":\"OC\\\\IntegrityCheck\\\\Exceptions\\\\MissingSignatureException\",\"message\":\"Signature data not found.\"}},\"comments\":{\"EXCEPTION\":{\"class\":\"OC\\\\IntegrityCheck\\\\Exceptions\\\\MissingSignatureException\",\"message\":\"Signature data not found.\"}},\"testing\":{\"EXCEPTION\":{\"class\":\"OC\\\\IntegrityCheck\\\\Exceptions\\\\MissingSignatureException\",\"message\":\"Signature data not found.\"}}}",
            "public_files": "files_sharing\/public.php",
            "public_webdav": "dav\/appinfo\/v1\/publicwebdav.php",
            "shareapi_allow_group_sharing": "yes",
            "shareapi_allow_links": "yes",
            "shareapi_allow_mail_notification": "no",
            "shareapi_allow_public_notification": "no",
            "shareapi_allow_public_upload": "yes",
            "shareapi_allow_resharing": "yes",
            "shareapi_allow_share_dialog_user_enumeration": "yes",
            "shareapi_allow_social_share": "yes",
            "shareapi_auto_accept_share": "yes",
            "shareapi_default_expire_date": "no",
            "shareapi_default_expire_date_group_share": "no",
            "shareapi_default_expire_date_remote_share": "no",
            "shareapi_default_expire_date_user_share": "no",
            "shareapi_enabled": "yes",
            "shareapi_enforce_expire_date": "no",
            "shareapi_enforce_expire_date_group_share": "no",
            "shareapi_enforce_expire_date_remote_share": "no",
            "shareapi_enforce_expire_date_user_share": "no",
            "shareapi_enforce_links_password_read_only": "no",
            "shareapi_enforce_links_password_read_write": "no",
            "shareapi_enforce_links_password_write_only": "no",
            "shareapi_exclude_groups": "no",
            "shareapi_exclude_groups_list": "",
            "shareapi_only_share_with_group_members": "no",
            "shareapi_only_share_with_membership_groups": "no",
            "shareapi_share_dialog_user_enumeration_group_members": "no",
            "vendor": "owncloud"
        },
        "dav": {
            "enabled": "yes",
            "installed_version": "0.6.0",
            "types": "filesystem"
        },
        "federatedfilesharing": {
            "enabled": "yes",
            "installed_version": "0.5.0",
            "types": "filesystem"
        },
        "federation": {
            "enabled": "yes",
            "installed_version": "0.1.0",
            "types": "authentication"
        },
        "files": {
            "cronjob_scan_files": "500",
            "enabled": "yes",
            "installed_version": "1.5.2",
            "types": "filesystem"
        },
        "files_external": {
            "enabled": "yes",
            "installed_version": "0.8.0",
            "types": "filesystem"
        },
        "files_sharing": {
            "blacklisted_receiver_groups": "[]",
            "enabled": "yes",
            "incoming_server2server_share_enabled": "yes",
            "installed_version": "0.14.0",
            "outgoing_server2server_share_enabled": "yes",
            "types": "filesystem"
        },
        "files_trashbin": {
            "enabled": "yes",
            "installed_version": "0.9.1",
            "types": "filesystem"
        },
        "files_versions": {
            "enabled": "yes",
            "installed_version": "1.3.0",
            "types": "filesystem"
        },
        "notifications": {
            "enabled": "yes",
            "installed_version": "0.5.2",
            "types": "logging"
        },
        "oauth2": {
            "enabled": "yes",
            "installed_version": "0.5.0",
            "types": "authentication"
        },
        "provisioning_api": {
            "enabled": "yes",
            "installed_version": "0.5.0",
            "types": "prevent_group_restriction"
        },
        "systemtags": {
            "enabled": "yes",
            "installed_version": "0.3.0",
            "types": "logging"
        },
        "testing": {
            "enabled": "yes",
            "installed_version": "0.1.0",
            "types": "dav,authentication"
        },
        "updatenotification": {
            "enabled": "yes",
            "installed_version": "0.2.1",
            "types": ""
        }
    }
}

@saw-jan
Copy link
Member Author

saw-jan commented Jun 16, 2021

is that the case for all private links for you or just when you navigate from the notification?

private links are as
pvtlinks

@saw-jan
Copy link
Member Author

saw-jan commented Jun 16, 2021

core/config/config.php

...
  'htaccess.RewriteBase' => '/core/',
  'web.rewriteLinks' => true,
  'web.baseUrl' => 'http://localhost:9100',
...

@kulmann kulmann added the Priority:p1-urgent Consider a hotfix release with only that fix label Dec 3, 2021
@kulmann kulmann added Priority:p3-medium Normal priority and removed Priority:p1-urgent Consider a hotfix release with only that fix labels Feb 17, 2022
@kulmann
Copy link
Member

kulmann commented Mar 8, 2022

I was able to reproduce this. It seems like the window url is used as base url for the private link. It needs to use the server url instead.
But, while looking into this with @dschmidt we discussed that it doesn't make much sense to show the private link at all. The user doesn't have access to the resource. Only way to gain access is to accept the share. In that case the notification disappears anyway.
I'd accept removing the private link from the notification as a solution to this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:p3-medium Normal priority
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

6 participants