Skip to content

Opening a shortcut file lets the linked site navigate the OpenCloud tab #4482

Closed

Description

@AlexAndBear

Initial Checklist

  • I understand this is a bug report and questions should be posted in the Community Discussions
  • I searched issues and couldn’t find anything (or linked relevant results below)

Bug Description

Opening a .url shortcut opens the target with window.open(url) and no noopener (useFileActionsOpenShortcut.ts), so the opened page gets window.opener and can redirect the OpenCloud tab, e.g. to a fake login page.

Reproduction Steps

  1. Create a shortcut via New > Shortcut pointing to an external https URL (or open a .url file someone shared with you)
  2. Click the shortcut, the site opens in a new tab
  3. In the new tab run window.opener.location = 'https://example.com'

Expected Outcome

The new tab has no window.opener and the OpenCloud tab stays where it was.

Actual Outcome

window.opener is set and the OpenCloud tab navigates away in the background.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions