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

Startpage redirection weirdness with host_permissions #30

Open
jahtnamas opened this issue Nov 27, 2024 · 4 comments
Open

Startpage redirection weirdness with host_permissions #30

jahtnamas opened this issue Nov 27, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@jahtnamas
Copy link

Describe the bug
Using a bang with Startpage as the browser's default search engine either: doesn't immediately redirect (this is new since I reported it, idk what exactly is up there) or only redirects when another link still on Startpage's domain is interacted with. I'm noticing now that the latter happens with my custom fixed speedrun.com bang specifically.

To Reproduce
Steps to reproduce the behavior:

  1. Bang search in browser's searchbar with Startpage as the default and hit enter.
  2. You are now on Startpage's results.

Expected behavior
Yang redirects to the requested search engine.

Desktop (please complete the following information):

  • OS: EndeavourOS Linux-zen 6.12.1
  • Browser: Firefox
  • Version: ESR 128.4

Additional context
I'll be quoting @dmlls' comment from #20

The problem lies in my misinterpretation of the host_permissions in the manifest.json. I always though they would match exactly the specified pattern, but obviously enough, they only match the host. This means that Yang will also be active in https://www.startpage.com/do/settings.

In the settings page, the search query is still included as a query parameter and since Yang is active, the bang is triggered.

anyway i hope i did okay with filing this issue 👍

@jahtnamas jahtnamas added the bug Something isn't working label Nov 27, 2024
@dmlls
Copy link
Owner

dmlls commented Nov 28, 2024

Hi @jahtnamas, and thank you for opening a new issue.

Unfortunately, I haven't been able to reproduce this issue neither on Firefox ESR, nor on Firefox, Zen Browser, or Firefox Android. Could you try on any other search engine and see if the issue is still there? I'm trying to figure out if this is specific to Startpage.

Also, the fact that it could take a second to redirect is likely caused by the migration to Manifest V3, in which blocking requests are no longer supported, which prevents us from blocking the request to the search engine while we "find" the bang and redirect to it. However, this usually happens so fast that the search engine is not even loaded.

@noodlejetski
Copy link

noodlejetski commented Feb 2, 2025

I'm experiencing that issue on the latest build of Zen Browser with Startpage set as the default engine. searching for ![bang] [query] just brings me to Startpage results for ![bang] [query], but when I press Enter on that results page, I'm redirected to search results for [query] on the website the ![bang] is supposed to redirect to in the first place.

the addon works as expected with Startpage on Firefox for Android, though.

@dmlls
Copy link
Owner

dmlls commented Feb 6, 2025

Hi @noodlejetski, hmm that's interesting. Does this happen always or just when starting the browser? I'm also using Zen (1.0.2-b.3) and gave it a quick try and everything worked as expected, so I assume it happens only sometimes?

@noodlejetski
Copy link

it happens every time I try performing a search from the URL bar, not just after launching the browser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants