Page MenuHomePhabricator

Automatic reference to shortened URL "youtu.be" gives "unreliable site" warning, doesn't let you insert reference
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Case 1: Using Visual Editor's automatic reference insertion, paste a shortened YouTube URL, like https://youtu.be/dQw4w9WgXcQ
  • Case 2: Also try with the full video URL, https://www.youtube.com/watch?v=dQw4w9WgXcQ

What happens?:

  • Case 1: The reference is correctly formatted for you, and the link goes to the full video URL (https://www.youtube.com/watch?v=dQw4w9WgXcQ), but you are also shown a scary red warning saying that the site is "considered unreliable", and can't insert the reference.
  • Case 2: The reference is formatted in exactly the same way, but no warning is shown and you can insert the reference.

What should have happened instead?:

  • No warning should be shown for youtu.be URLs when the resulting URL doesn't include youtu.be

Software version (skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

Event Timeline

jhsoby added subscribers: DLynch, Esanders.

@Esanders @DLynch Adding you since you seem to be involved in this new feature, so maybe you have an idea how to solve this too. :-)

This comment was removed by Esanders.

The error message you get in the save dialog is a lot more verbose, and includes information about not using URL shorteners:

image.png (391×530 px, 62 KB)

We discussed URL redirects at the time that we thought it was better to validate the inputted URL, but it looks like we will probably need to change that. This will make the feature a little slower as the API requests will need to happen in series, rather than parallel.

Esanders renamed this task from Automatic reference to youtu.be gives "unreliable site" warning, doesn't let you insert reference to Automatic reference to shortened URL "youtu.be" gives "unreliable site" warning, doesn't let you insert reference.Mar 7 2024, 1:50 PM

Change 1009535 had a related patch set uploaded (by Esanders; author: Esanders):

[mediawiki/extensions/Citoid@master] editcheckreferenceurl: Validate URL returned from Citoid, not input

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

Change 1009334 had a related patch set uploaded (by DLynch; author: Esanders):

[mediawiki/extensions/Citoid@wmf/1.42.0-wmf.21] editcheckreferenceurl: Validate URL returned from Citoid, not input

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

Change 1009334 merged by jenkins-bot:

[mediawiki/extensions/Citoid@wmf/1.42.0-wmf.21] editcheckreferenceurl: Validate URL returned from Citoid, not input

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

Change 1009535 merged by jenkins-bot:

[mediawiki/extensions/Citoid@master] editcheckreferenceurl: Validate URL returned from Citoid, not input

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

Mentioned in SAL (#wikimedia-operations) [2024-03-07T14:51:41Z] <ladsgroup@deploy2002> Started scap: Backport for [[gerrit:1009334|editcheckreferenceurl: Validate URL returned from Citoid, not input (T359527)]]

Mentioned in SAL (#wikimedia-operations) [2024-03-07T14:53:12Z] <ladsgroup@deploy2002> kemayo and ladsgroup: Backport for [[gerrit:1009334|editcheckreferenceurl: Validate URL returned from Citoid, not input (T359527)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2024-03-07T15:05:05Z] <ladsgroup@deploy2002> Finished scap: Backport for [[gerrit:1009334|editcheckreferenceurl: Validate URL returned from Citoid, not input (T359527)]] (duration: 13m 23s)

@Esanders Thanks for the quick response and action! 🎉

Mvolz triaged this task as High priority.