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

[Bug]: Accept/reject remote share action from "pending shares" view does not work #31301

Closed
5 of 8 tasks
emillumine opened this issue Feb 21, 2022 · 5 comments
Closed
5 of 8 tasks
Labels
2. developing Work in progress bug

Comments

@emillumine
Copy link

⚠️ This issue respects the following points: ⚠️

  • This is a bug, not a question or a configuration/webserver/proxy issue.
  • This issue is not already reported on Github (I've searched it).
  • Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
  • I agree to follow Nextcloud's Code of Conduct.

Bug description

When I receive a folder remote share from a remote server (via federation sharing) and I go to the Shares > Pending shares, I can see the shared folder but when I click on "Accept share" or "Refuse share", there is an error message and nothing happens.

Error message : "Something happened. Unable to accept the share."
nextcloud share error

When clicking "Accept share", the Firefox devtools console returns the following (each time of a click):
XHR POST https://nuage.yaal.fr/ocs/v2.php/apps/files_sharing/api/v1/shares/pending/10 [[HTTP/2 404 Not Found 107ms]]

Note the "shares" part in the url (where I would expect "remote_shares" instead).

Steps to reproduce

  1. Share a folder form server1 with a remote user on another federated server2
  2. Connect to server2 as the remote user and go to the pending shares view (from "Shares" > "Pending shares" menu)
  3. Click on "Accept share" or "Refuse share"

Expected behavior

I'm expecting the action "Accept" or "Refuse" to be performed, with no error.

I suspect the url on which the POST action is done to be incorrect :
shouldnt https://nuage.yaal.fr/ocs/v2.php/apps/files_sharing/api/v1/shares/pending/10 be https://nuage.yaal.fr/ocs/v2.php/apps/files_sharing/api/v1/remote_shares/pending/10 instead? (Based on the documentation https://docs.nextcloud.com/server/latest/developer_manual/client_apis/OCS/ocs-share-api.html).

Installation method

Manual installation

Operating system

Debian/Ubuntu

PHP engine version

PHP 7.4

Web server

Nginx

Database engine version

PostgreSQL

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

Fresh Nextcloud Server install

Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

What user-backends are you using?

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

Configuration report

{
    "system": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "nuage.yaal.fr"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "23.0.1.2",
        "overwrite.cli.url": "https:\/\/nuage.yaal.fr",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "skeletondirectory": "",
        "default_language": "fr",
        "default_locale": "fr_FR",
        "defaultapp": "files",
        "knowledgebaseenabled": false,
        "allow_user_to_change_display_name": false,
        "auth.bruteforce.protection.enabled": true,
        "auth.webauthn.enabled": true,
        "lost_password_link": "https:\/\/auth.yaal.fr\/reset",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": 587,
        "mail_smtpsecure": "tls",
        "htaccess.RewriteBase": "\/",
        "htaccess.IgnoreFrontController": false,
        "logfile": "\/opt\/nextcloud\/logs\/nextcloud.log",
        "logtimezone": "Europe\/Paris",
        "apps_paths": [
            {
                "path": "\/opt\/nextcloud\/src\/apps",
                "url": "\/apps",
                "writable": true
            }
        ],
        "memcache.local": "\\OC\\Memcache\\APCu",
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 6379,
            "timeout": 0,
            "password": "***REMOVED SENSITIVE VALUE***",
            "dbindex": 0
        },
        "upgrade.disable-web": true,
        "simpleSignUpLink.shown": false,
        "default_phone_region": "FR",
        "oidc_login_provider_url": "https:\/\/auth.yaal.fr",
        "oidc_login_client_id": "g1Fjw630kvyTq6gSSINTiADV",
        "oidc_login_client_secret": "RXogDOUYeVnHCmmb2S1hCIgkdWibA5ZXyITzLKPHQZCyfYsJ",
        "oidc_login_auto_redirect": true,
        "oidc_login_logout_url": "https:\/\/auth.yaal.fr\/logout",
        "oidc_login_end_session_redirect": false,
        "oidc_login_default_quota": "5368709120",
        "oidc_login_button_text": "Se connecter avec canaille",
        "oidc_login_hide_password_form": true,
        "oidc_login_use_id_token": true,
        "oidc_login_attributes": {
            "id": "sub",
            "name": "name",
            "mail": "email",
            "ldap_uid": "sub",
            "groups": "groups"
        },
        "oidc_login_default_group": "",
        "oidc_login_use_external_storage": false,
        "oidc_login_scope": "profile email groups",
        "oidc_login_proxy_ldap": false,
        "oidc_login_disable_registration": false,
        "oidc_login_redir_fallback": false,
        "oidc_login_tls_verify": true,
        "oidc_login_webdav_enabled": true,
        "oidc_login_password_authentication": true,
        "oidc_login_public_key_caching_time": 86400,
        "oidc_login_min_time_between_jwks_requests": 10,
        "oidc_login_well_known_caching_time": 86400,
        "oidc_create_groups": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_sendmailmode": "smtp",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***"
    }
}

List of activated Apps

Enabled:
  - accessibility: 1.9.0
  - calendar: 3.0.6
  - cloud_federation_api: 1.6.0
  - comments: 1.13.0
  - contacts: 4.0.8
  - contactsinteraction: 1.4.0
  - dav: 1.21.0
  - federatedfilesharing: 1.13.0
  - federation: 1.13.0
  - files: 1.18.0
  - files_pdfviewer: 2.4.0
  - files_rightclick: 1.2.0
  - files_sharing: 1.15.0
  - files_trashbin: 1.13.0
  - files_versions: 1.16.0
  - files_videoplayer: 1.12.0
  - firstrunwizard: 2.12.0
  - impersonate: 1.10.0
  - logreader: 2.8.0
  - lookup_server_connector: 1.11.0
  - nextcloud_announcements: 1.12.0
  - notifications: 2.11.1
  - oauth2: 1.11.0
  - oidc_login: 2.2.0
  - onlyoffice: 7.3.0
  - password_policy: 1.13.0
  - photos: 1.5.0
  - privacy: 1.7.0
  - provisioning_api: 1.13.0
  - recommendations: 1.2.0
  - serverinfo: 1.13.0
  - settings: 1.5.0
  - sharebymail: 1.13.0
  - support: 1.6.0
  - survey_client: 1.11.0
  - systemtags: 1.13.0
  - text: 3.4.0
  - theming: 1.14.0
  - twofactor_backupcodes: 1.12.0
  - updatenotification: 1.13.0
  - user_status: 1.3.1
  - viewer: 1.7.0
  - weather_status: 1.3.0
  - workflowengine: 2.5.0
Disabled:
  - activity: 2.15.0
  - admin_audit
  - circles: 23.0.1
  - dashboard: 7.3.0
  - encryption
  - files_external
  - user_ldap

Nextcloud Signing status

No errors have been found.

Nextcloud Logs

No response

Additional info

We are using OIDC user-backend with oidc_login plugin (see Configuration report)

@emillumine emillumine added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Feb 21, 2022
@tincanfury
Copy link

I'm having a similar outcome, but my link appears to be correct. Not sure if this is the same issue, or indicating the issue is deeper than just the URL?
https://URL/nextcloud/ocs/v2.php/apps/files_sharing/api/v1/remote_shares/pending/19

@MSe1969
Copy link
Contributor

MSe1969 commented Apr 8, 2022

I am experiencing exactly the same issue: Fresh install of NC 23.0.3 with PHP 8 - but also existing other instances (all NC 23.x) have that issue! I can also 1:1 confirm the FF devtools console outputs.
Nobody else having that issue?

@MSe1969
Copy link
Contributor

MSe1969 commented Apr 8, 2022

Created a pull request, see above. To manually fix (if you have access), you need to edit the file
nextcloud/apps/files_sharing/js/dist/files_sharing.js accordingly in addition.

@szaimen szaimen added 2. developing Work in progress and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Apr 8, 2022
@tincanfury
Copy link

Created a pull request, see above. To manually fix (if you have access), you need to edit the file nextcloud/apps/files_sharing/js/dist/files_sharing.js accordingly in addition.

That looks to have fixed it for me! thanks!!

szaimen added a commit that referenced this issue Apr 12, 2022
Fix accept/reject remote share action #31301
szaimen added a commit that referenced this issue Apr 12, 2022
This is the fix for the described problem in
#31301

Signed-off-by: MSe1969 <mse1969@posteo.de>
Signed-off-by: szaimen <szaimen@e.mail.de>
artonge pushed a commit that referenced this issue Apr 14, 2022
This is the fix for the described problem in
#31301

Signed-off-by: MSe1969 <mse1969@posteo.de>
Signed-off-by: szaimen <szaimen@e.mail.de>
nextcloud-command pushed a commit that referenced this issue Apr 14, 2022
This is the fix for the described problem in
#31301

Signed-off-by: MSe1969 <mse1969@posteo.de>
Signed-off-by: szaimen <szaimen@e.mail.de>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@blizzz
Copy link
Member

blizzz commented Apr 14, 2022

supposed to be fixed with #31910

@blizzz blizzz closed this as completed Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing Work in progress bug
Projects
None yet
Development

No branches or pull requests

5 participants