estivo / Instantfox

Instantfox Quick Search » Firefox Add-On for a smart address bar
http://www.instantfox.net
GNU General Public License v2.0
59 stars 11 forks source link

[bug] no delay (or a too low value) between the char typed and query sent causes query flood -> ban from search engine #90

Closed Drugoy closed 2 months ago

Drugoy commented 11 years ago

Some time earlier I've reported you a major bug that you claimed you have fixed in 2.8.2. The bug was about "Standard search without shortcuts" feature which was persistent even when switched off. Then you claimed you fixed it in 2.8.1 and 2.8.2: now, if that option is switched off - when the user types anything into address-bar - he gets no search results, which are related to the default engine, injected into the drop-down list, which then shows only history search results. I thought you've actually fixed that feature and that now no queries get sent to the search engine, but no, you've just hid those results from the drop-down list, but the queries are still being sent to the currently selected search engine! That's unbelievable! I've changed the active search engine from google to another one. And that site who's search engine I switched to started blocking me: they started requesting me to pass the captcha because they detected I send them too many queries. So everything the user types-in into address bar gets sent to the currently selected search engine, even when the "Standard search without shortcuts" option is switched off.

Edit: read the last comment

nightwing commented 11 years ago

you've just hid those results from the drop-down list, but the queries are still being sent to the currently selected search engine! That's unbelievable!

please do not assume malice, where is only tricky bug to fix. We do not get any benefit from sending queries.

This is a very severe bug indeed, but I can't reproduce it. nor see any way it could happen, since i've disabled it before any request initializtion.

my steps

1- created a server that logs every request, either local with node or http://jsapp.us/# (works on chrome)

var http = require("http")
var old = ["URLs"]
http.createServer(function(request, response) {
    console.log(request.url)
    old.push(request.url)
    response.end(old.join("\n"))
}).listen(8888, "0.0.0.0");

console.log("http://localhost");

you can create your own or use mine http://0431181036.test.jsapp.us/ (not sure how long it will be active, but if it isn't just open http://jsapp.us/ paste the code above and hit ctrl-b)

2- changed default search suggestion url to http://0431181036.test.jsapp.us/%q and enabled it now typing anything longer than two chars is logged on http://0431181036.test.jsapp.us/ as expected

3- disabled default search with disable button, searches were not logged anymore 4- enabled it and disabled suggest url with checkbox searches still not logged

5- enabled and they were logged again.

Could you please retry this and tell me what i did wrong.

Drugoy commented 11 years ago

Don't take any offense at me, I'm not accusing you or your add-on, I've just came across with an issue and I supposed that Instantfox is the cause, but I'm not 100% sure. I took easier steps: I've just disabled InstantFox and selected google search engine in the quick search-bar. Now whenever I try to search something from address using the search engine that prompts me to pass captcha - it does so again. So, seems like InstantFox is not the reason of blocks. Sorry that I blamed it first.

Drugoy commented 11 years ago

EDIT2: the actual reason was not cookies or something. I've contacted the support of the site who's search engine I used and they confirmed they blocked me due to "a flow of automatic requests". But the only change in my browsing was the recent installation of InstantFox. My new guess is the following: InstantFox generates 1 request per 1 entered symbol, if "Instant Page Loading" feature is on.

Probably you've decreased (or didn't set) the delay between queries to maximally decrease page loading time, but that also increases the number of queries, if the user manually types-in the query.

If my guess is correct, you should change something, so users won't get banned by search engines. Turning "Instant Page Loading" feature off by default is not a way out: users might like it, so they will turn it on manually, even if you show a warning that this may generate more queries.

From my point of view, there are 2 possible ways out: 1) set/increase the timer after a symbol was typed and before the query gets sent. Minuses of this approach are: a) user may type slowly, so the query will still get sent after each key. b) The higher value you set for the timer the more time it will take for the page to start load after the final symbol typed.

2) completely disable sending queries until the user hits some hotkey: I prefer this approach, since anyway the user has a keyboard under both hands, if he manually types-in the query. a) A hotkey may even consist of just 1 symbol (like a backtick or something). b) You could make the hotkey press required only for the case when the user manually types-in the query, and do not require it for the case when user pastes something from clipboard.