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

Only run on whitelisted domains #3

Closed
nonamethanks opened this issue Apr 21, 2021 · 2 comments
Closed

Only run on whitelisted domains #3

nonamethanks opened this issue Apr 21, 2021 · 2 comments

Comments

@nonamethanks
Copy link

nonamethanks commented Apr 21, 2021

I've noticed looking at the server logs that whenever I open a new tab on my browser, the extension calls the server, and logs:
[Plugin System] [info] No login plugin specified, returning empty UserAgent.

The user should be able to specify a whitelist outside of which the extension should not run, or the extension should just be able to get the supported domains from the server itself and not bother in other sites.

@Difegue
Copy link
Owner

Difegue commented Apr 21, 2021

As said in #2, the download system doesn't really have a concept of "supported domains", so it'll try to download any url thrown at it.

Now in practice, downloads will realistically only work with direct file URLs or URLs that have a matching downloader plugin, so it'd be possible to check api/plugins/download on the extension side to get a list of URL regexes to map against:

image

@Difegue
Copy link
Owner

Difegue commented May 7, 2021

The automatic check when opening a new tab now only occur if the URL has a matching regex in the server's downloader list.
It's always possible to bypass this and perform a check manually by clicking "Recheck" in the popup. 👏

@Difegue Difegue closed this as completed May 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants