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

Closed
jahtnamas opened this issue Nov 27, 2024 · 8 comments
Closed

Startpage redirection weirdness with host_permissions #30

jahtnamas opened this issue Nov 27, 2024 · 8 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.

@jschenke488
Copy link

jschenke488 commented Mar 5, 2025

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

Have this same issue on Ablaze Floorp v11.23.1 on macOS

yang.mov

@samyakbardiya
Copy link
Contributor

I tried to reproduce the issue, and was able to identify the issue.

  • this issue only happens when you have added Startpage search engine as their extension
  • BUT, if you have added it directly from the URL bar, or manually, in that case it simply works fine.

So as a quick fix, I would recommend uninstalling the Startpage extension, and add the search engine from the URL bar.

@noodlejetski
Copy link

removing the Startpage addon and adding the search engine back from the URL bar indeed made Yang work as intended, thanks!

@dmlls
Copy link
Owner

dmlls commented Mar 7, 2025

Thank you all for your reports!

@samyakbardiya this indeed seems to be the root cause, I can finally reproduce it! I have already identified the issue and will include a fix in the upcoming release.

dmlls added a commit that referenced this issue Mar 7, 2025
dmlls added a commit that referenced this issue Mar 7, 2025
@dmlls dmlls mentioned this issue Mar 7, 2025
@dmlls dmlls closed this as completed in 0cc2290 Mar 8, 2025
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

5 participants