Page MenuHomePhabricator

Prepare WikimediaMessages extension for IP Masking
Closed, ResolvedPublic

Description

A preliminary investigation (T326759) has found that the WikimediaMessages extension may be affected by IP Masking

Event Timeline

Tacsipacsi subscribed.

The only result is the IP Info feedback link in rEWME /includes/Hooks.php:1808 (at 2ecf2b6c888f) (originally added by @Tchanders in a4a3b5bd8416). If it’s still needed, maybe IPInfo should provide a more appropriate integration, which doesn’t require the Wikimedia Messages code to guess whether IPInfo will load?

Dreamy_Jazz claimed this task.
Dreamy_Jazz subscribed.

The feedback link has been removed, but there is still some IP Info integration. However, it depends on the user having a specific right that cannot be granted to temporary users (considering that they cannot have user groups).

Tacsipacsi removed Dreamy_Jazz as the assignee of this task.

When, where? I don’t see any commits related to IP Info in the WikimediaMessages repo in the past ten days. If the code I highlighted has become dead, it should be deleted; if it isn’t, it should be fixed.

Dreamy_Jazz closed this task as Resolved.EditedThu, Jun 20, 12:55 PM
Dreamy_Jazz added a subscriber: kostajh.

The feedback link was removed in 8dde4b458b8e9954c528870c242c8f5107fa5507 (by me). The other IP Info specific information does not require modification for IP Masking / temporary accounts, and as such this task can be closed.

I discussed this with @kostajh and @Tchanders at our offsite before closing the first time. Hopefully my explanation above is clearer.

If you think the other IP Info specific code should be removed from WikimediaMessages that would be something for T361044 and not this task. It is still used to provide wikimedia-specific links to the infobox.

The feedback link was removed in 8dde4b458b8e9954c528870c242c8f5107fa5507 (by me).

Indeed, I didn’t notice that the original purpose of the code (feedback link) isn’t fulfilled anymore. However…

It is still used to provide wikimedia-specific links to the infobox.

…those links (Global contributions and XTools) are only added to the IP Info interface if the ResourceLoader module adding them is loaded, which in turn only happens if IPUtils::isValid($subPage), thus they’re missing when IP Info appears for temp users. Since the reason for the existence of IP Info is exactly to provide information on temp users, these links not appearing there makes them pretty much useless (they can still be used when looking at pre-IP masking contributions, but most people aren’t interested in wiki history). Since both tools work both with IPs and named users, I guess they will work with temp users as well.

...thus they’re missing when IP Info appears for temp users.

This does not currently happen in IP Info, as that extension has the same check as WikimediaMessages.

While that code will definitely need updating if support for temporary accounts is added to IP Info, making the IP Info changes isn't really in the scope of this task (which is updating this extension specifically without thinking about future feature requests for IP Info). IMO it would be done as part of the feature request that adds support for the infobox on temporary account userpages.

The scope of this task is to ensure that code in WikimediaMessages is future-proof in respect to the introduction of temporary users. Since the introduction of temporary users will inevitably cause IP Info to be made available for checking temp users, I don’t think the current code is future-proof. As I wrote in T326933#9881703, IP Info should provide a future-proof way to do what we do. Some ideas (from least change to best outcome):

  • A static method that can be used by WikimediaMessages (and is used by IP Info as well) to determine whether IP Info loads. The common method ensures consistency.
  • A PHP hook allowing WikimediaMessages to load its ResourceLoader module when IP Info will also load.
  • A PHP hook allowing WikimediaMessages to add links in PHP, not bothering about JS at all.
  • A configuration variable allowing to add links in LocalSettings.php (CommonSettings.php or InitialiseSettings.php in WMF prod), completely removing the code from WikimediaMessages, putting it where it belongs.