Closed DavidSchechter closed 3 weeks ago
Also being presented by this captcha
This is a bug but probably cannot be fixed.
Some search engines have specific queries in URLs when searching from Safari search bar. In this case, CSE will check this before redirecting. https://github.com/Cizzuk/CSE/blob/bdc7407bf1ae798b1ab59825d71eb1f96a081fe2/Custom%20Search%20Engine%20Extension/Resources/content.js#L33
However, some search engines, including Google, do not have this query and CSE cannot recognize how to search.
There are workarounds. If you want to set your custom search engine to Google, you can set your default search engine to Bing, and redirect loop will not occur.
I will try to find a way to fix this bug, but it will take some time.
Understandable that there are challenges in identifying specific queries.
Potential way to resolve: Check if ‘Path’ contains ‘Top of url’. If it does already contains it, bail out and stop attempting to replace/redirect the url.
This check would be done prior to any domain specific checks.
Could this approach potentially work?
Maybe, yes.
But I think it should check both Top and Suffix URLs.
And I don't think it works correctly when redirected from google.com
to www.google.com
.
But I will try this, thank you!
Agreed that it should check for both ‘top’ and ‘suffix’.
For www.google.com vs google.com - the beginning of the ‘Path’ can be filter out (remove http://www or https://www) and make the contains check without the prefix
Hi, Any update on this issue?
Thanks
https://github.com/Cizzuk/CSE/issues/4#issuecomment-2144026867 I have tried this and was able to stop the redirect loop. I am making some changes to clean up content.js to fix this issue. This, including testing, will take some time, but will be useful for future fixes!
https://github.com/Cizzuk/CSE/commit/aa535294c6bc382d1dd843f92805df4bd1ad5b8a This bug has been fixed. @DavidSchechter, Thank you!
Root cause: Top of url included support url. Redirect / reset of url is done always without ignoring / excluding “top of url”.
Sets to reproduce:
Issue isn’t reproducible if DuckDuckGo is set as the default search engine both in CSE and Safari Settings.
Thank you in advance