Page MenuHomePhabricator

Catches non-http/https links, but cannot whitelist them via MediaWiki:Captcha-addurl-whitelist
Closed, ResolvedPublic

Description

The ConfirmEdit extension allows for local wikis to whitelist links using [[MediaWiki:Captcha-addurl-whitelist]]. But this only allows for whitelisting http and https links, even though the extension will trigger a captcha for any protocol.

The question here is twofold:

  1. Should ConfirmEdit trigger captchas for other types of links in the first place?
  2. If so, how can we extend [[MediaWiki:Captcha-addurl-whitelist]] to allow these to be whitelisted?

Personally, I'm inclined to answer "yes" and "Perhaps add flags like in [[MediaWiki:TitleBlacklist]], one of which would indicate that this line should not be prefixed with /^https?:\/\/+[a-z0-9_\-.]*/"


Version: master
Severity: normal
URL: https://en.wikipedia.org/wiki/Wikipedia:Village_pump_(technical)#Contains_external_links

Details

Reference
bz56485

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:30 AM
bzimport set Reference to bz56485.

(In reply to comment #0)

Personally, I'm inclined to answer "yes" and "Perhaps add flags like in
[[MediaWiki:TitleBlacklist]], one of which would indicate that this line
should not be prefixed with /^https?:\/\/+[a-z0-9_\-.]*/"

This sounds sensible to me.

singaporemaps wrote:

*** Bug 57468 has been marked as a duplicate of this bug. ***

singaporemaps wrote:

Should have checked the bug list beforehand. This above modification would be much appreciated.

On the English Wikivoyage, we have added tel:// protocol links to phone numbers
so that users can dial through on their mobile phones. However, since tel://
links are considered external links, all new phone numbers added now require a
CAPTCHA to be filled.

I checked MediaWiki:Captcha-addurl-whitelist, but it seems that it is
restricted to HTTP/HTTPS. Is it possible to modify it to accept tel:// links,
and maybe even geo:// links?

Change 97317 had a related patch set uploaded by Anomie:
Allow 'noprotocol' option in captcha-addurl-whitelist

https://gerrit.wikimedia.org/r/97317

singaporemaps wrote:

Thanks for the quick patch.

To confirm, the regex for whitelisting tel: links would be something along the lines of -

tel <noprotocol> ?

I had it on my todo list since November 1, and your comment coincidentally came at the same time I found the combination of volunteer time and motivation to work on it ;)

I'd use "tel:// <noprotocol>", or "tel: <noprotocol>" if the links don't use the //.

Change 97317 merged by jenkins-bot:
Allow 'noprotocol' option in captcha-addurl-whitelist

https://gerrit.wikimedia.org/r/97317

Change merged. It should be deployed to WMF wikis with 1.23wmf7, see https://www.mediawiki.org/wiki/MediaWiki_1.23/Roadmap for the schedule.