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

desktop: Move open URLs mode from launch options to preferences #18233

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

kjarosh
Copy link
Member

@kjarosh kjarosh commented Oct 10, 2024

This PR moves open links behavior preference from launch options (which was settable before running each SWF) to the preferences (which is settable at any point in time and is persistent).

Additionally, this PR changes the default to "confirm". Users who don't want the confirmation popup to be displayed all the time can disable it, and others will have an additional layer of security on by default.

Opening links without confirmation is unsafe because:

  1. It shares your IP address and other information.

  2. It might be used to leak sensitive information in the URL.

By having the confirmation dialog on by default, users will have a chance to check if the link is safe before opening it.

Fixes #17432.

CC @n0samu

@torokati44 This PR changes a bit the frontend utils API which gives more control to the implementations over how links are opened, but requires adding a simple check by them to preserve the same behavior as before.

This allows for greater control over opening URLs on desktop, e.g.
makes it possible to change the mode in runtime without reinstantiating
everything.
OpenUrlModePreference is strictly related to the desktop, which
decouples it from the core in this regard.

Additionally this patch makes Confirm the default, as it prepares it
to be added to Ruffle preferences.
This value controls how links are opened.
After changes in desktop, this is the only place where it is used.
This additionally renames it to OpenUrlMode.
@kjarosh kjarosh added A-desktop Area: Desktop Application security Pull requests that address a security vulnerability T-feature Type: New Feature (that Flash doesn't have) labels Oct 10, 2024
@kjarosh kjarosh added the waiting-on-review Waiting on review from a Ruffle team member label Oct 10, 2024
@torokati44
Copy link
Member

@torokati44 This PR changes a bit the frontend utils API which gives more control to the implementations over how links are opened, but requires adding a simple check by them to preserve the same behavior as before.

I assume you noted this due to the Android app - thanks for the heads-up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-desktop Area: Desktop Application security Pull requests that address a security vulnerability T-feature Type: New Feature (that Flash doesn't have) waiting-on-review Waiting on review from a Ruffle team member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change default value for "Open Links" on the desktop app to "Ask"
2 participants