Dokuwiki: Please remove unintended google search

Created on 20 Nov 2018  路  4Comments  路  Source: splitbrain/dokuwiki

When /inc/parser/renderer.php meets a link with an "unknown" protocol, such as "file://", clicking that link sends the contents of the link to Google search WHICH WAS OBVIOUSLY NOT INTENDED BY THE USERS and can disclose personal information.

  821      function _resolveInterWiki(&$shortcut, $reference, &$exists = null) {
  822          //get interwiki URL
  823          if(isset($this->interwiki[$shortcut])) {
  824              $url = $this->interwiki[$shortcut];
  825          } else {
  826              // Default to Google I'm feeling lucky
  827              $url      = 'https://www.google.com/search?q={URL}&btnI=lucky';
  828              $shortcut = 'go';
  829          }

Please remove this feature.

Syntax Feature needDocUpdate

Most helpful comment

While I'm not convinced that the fallback Google "I'm Feeling Lucky" behaviour presents much of a risk for most users, I don't see that it adds much value either. Given that, and given that it is possible to imagine a scenario where this might present a risk to a user connecting to the Internet via a proxy controlled by e.g. an authoritarian government, I agree that it should be removed.

As for how to handle undefined interwiki types, my suggestion is to create no link at all, and add a warning message:

2 links on this page refers to an undefined interwiki type:
[[fruit>apple]]
[[fruit>banana]]

where fruit is not defined as an interwiki.

The current Google behaviour could be retained as a config option for anyone who wanted to keep doing that. I'm struggling to imagine when the current behaviour is ever what people want though.

I'm willing to code my proposal, if there is consensus that it's a worthwhile thing to do.

All 4 comments

Good observation. Some clarification:

When /inc/parser/renderer.php meets a link with an "unknown" protocol, such as file://...

The link in this situation (file://...) just doesn't render at all, instead of guiding user to Google. The code mentioned (whose idea exists for 10+ years) handles interwiki syntax like file>....

Demo: https://www.dokuwiki.org/playground:issue2588

I wonder where is better for us to direct users to in this situation? Maybe the first item in interwiki.conf (as the default/fallback)?

While I'm not convinced that the fallback Google "I'm Feeling Lucky" behaviour presents much of a risk for most users, I don't see that it adds much value either. Given that, and given that it is possible to imagine a scenario where this might present a risk to a user connecting to the Internet via a proxy controlled by e.g. an authoritarian government, I agree that it should be removed.

As for how to handle undefined interwiki types, my suggestion is to create no link at all, and add a warning message:

2 links on this page refers to an undefined interwiki type:
[[fruit>apple]]
[[fruit>banana]]

where fruit is not defined as an interwiki.

The current Google behaviour could be retained as a config option for anyone who wanted to keep doing that. I'm struggling to imagine when the current behaviour is ever what people want though.

I'm willing to code my proposal, if there is consensus that it's a worthwhile thing to do.

I'd rather make it configurable, for example via a default keyword in the interwiki config file.

Not sure if it's worth adding a new syntax of interwiki link ignoring the wikiname >query (equals to default>query).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

schplurtz picture schplurtz  路  5Comments

yasuhirokimura picture yasuhirokimura  路  5Comments

wangxu94 picture wangxu94  路  5Comments

rojenzaman picture rojenzaman  路  4Comments

KristjanESPERANTO picture KristjanESPERANTO  路  3Comments