text
text copied to clipboard
[Bug]: clicking a hyperlink in a document opens in both the current tab and a new tab for users who can't edit the file
⚠️ This issue respects the following points: ⚠️
- [X] This is a bug, not a question or a configuration/webserver/proxy issue.
- [X] This issue is not already reported on Github OR Nextcloud Community Forum (I've searched it).
- [X] Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- [X] I agree to follow Nextcloud's Code of Conduct.
Bug description
When a user opens a file (tested with markdown .md file, but possibly .odt as well) that's been shared with them, but which they don't have edit permissions for, and they left-click a hyperlink in that file, the link opens in both a new tab and the existing Nextcloud tab, simultaneously.
This does not occur if the user has 'edit' rights to the document. In this scenario, the link only opens in a new tab, as expected.
Steps to reproduce
- Create a markdown file and put a hyperlink in it (e.g a link to this Github issue)
- Share the file with another Nextcloud user, but don't give them edit rights to the file
- Left-click the link in the file as that other Nextcloud user - link opens in 2 tabs (one new tab, and the existing Nextcloud tab)
- Grant that Nextcloud user 'edit' rights to the file
- Open the file in Nextcloud again as that user and left-click the same link - link opens in just one new tab
Expected behavior
The link should only open in a new tab, regardless of edit or no-edit permission for that user
Installation method
Community Docker image
Nextcloud Server version
25
Operating system
Debian/Ubuntu
PHP engine version
PHP 8.1
Web server
Apache (supported)
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
None
Are you using the Nextcloud Server Encryption module?
Encryption is Enabled
What user-backends are you using?
- [X] Default user-backend (database)
- [ ] LDAP/ Active Directory
- [ ] SSO - SAML
- [ ] Other
Configuration report
{
"system": {
"htaccess.RewriteBase": "\/",
"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
}
],
"mail_smtpmode": "smtp",
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "465",
"mail_smtpsecure": "ssl",
"mail_smtpauth": true,
"mail_smtpauthtype": "LOGIN",
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"nextcloud.xxxxx.xxx"
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "mysql",
"version": "25.0.8.2",
"overwrite.cli.url": "https:\/\/nextcloud.xxxxx.xxx",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "oc_",
"instanceid": "***REMOVED SENSITIVE VALUE***",
"mysql.utf8mb4": true,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"overwritehost": "nextcloud.xxxxx.xxx",
"overwriteprotocol": "https",
"loglevel": 2,
"maintenance": false,
"twofactor_enforced": "true",
"twofactor_enforced_groups": [],
"twofactor_enforced_excluded_groups": []
}
}
List of activated Apps
Enabled:
- activity: 2.17.0
- bruteforcesettings: 2.5.0
- circles: 25.0.0
- cloud_federation_api: 1.8.0
- comments: 1.15.0
- contactsinteraction: 1.6.0
- dashboard: 7.5.0
- dav: 1.24.0
- encryption: 2.13.0
- federatedfilesharing: 1.15.0
- federation: 1.15.0
- files: 1.20.1
- files_pdfviewer: 2.6.0
- files_rightclick: 1.4.0
- files_sharing: 1.17.0
- files_trashbin: 1.15.0
- files_versions: 1.18.0
- firstrunwizard: 2.14.0
- integration_github: 1.0.15
- logreader: 2.10.0
- lookup_server_connector: 1.13.0
- nextcloud_announcements: 1.14.0
- notifications: 2.13.1
- oauth2: 1.13.1
- password_policy: 1.15.0
- photos: 2.0.1
- polls: 5.0.5
- privacy: 1.9.0
- provisioning_api: 1.15.0
- recommendations: 1.4.0
- related_resources: 1.0.4
- richdocuments: 7.1.4
- serverinfo: 1.15.0
- settings: 1.7.0
- sharebymail: 1.15.0
- support: 1.8.0
- survey_client: 1.13.0
- systemtags: 1.15.0
- text: 3.6.0
- theming: 2.0.1
- twofactor_backupcodes: 1.14.0
- twofactor_totp: 7.0.0
- twofactor_webauthn: 1.2.0
- updatenotification: 1.15.0
- user_status: 1.5.0
- viewer: 1.9.0
- weather_status: 1.5.0
- workflowengine: 2.7.0
Disabled:
- admin_audit
- files_external
- notify_push: 0.6.3
- suspicious_login
- user_ldap
Nextcloud Signing status
No errors have been found.
Nextcloud Logs
No response
Additional info
No response