Page MenuHomePhabricator

Notifications count via notwikis=* doesn’t work for sessions providers other than CentralAuth
Open, Needs TriagePublic

Description

There are two ways to get the total number of notifications: notwikis=* and notcrosswikisummary=1. However, for some reason, only notcrosswikisummary=1 seems to work via OAuth – notwikis=1 shows the total number of notifications in a browser but only counts notifications on the target wiki when the same URL is requested in a request authenticated with OAuth. I can only assume that this is a bug.

Event Timeline

Restricted Application added a project: Growth-Team. · View Herald TranscriptJun 25 2019, 10:33 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Tgr added a subscriber: Tgr.Jun 26 2019, 9:30 AM

Probably some permission check somewhere, that's not included in the grant? Can't find it at a glance, though.

JTannerWMF added a subscriber: JTannerWMF.

The Growth-Team is not prioritizing this bug at this time

Anomie renamed this task from Notifications count via notwikis=* doesn’t work via OAuth to Notifications count via notwikis=* doesn’t work for sessions providers other than CentralAuth.Jul 11 2019, 6:56 PM
Anomie added a subscriber: Anomie.

Not just OAuth, it also doesn't work with BotPasswords.

The culprit seems to be https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/Echo/+/d1eac9bf068e98a5245cc237eb3832a0e0429842/includes/ForeignWikiRequest.php#73 where it specifically only works with CentralAuth's sessions.

The simplest fix might be to at least acknowledge that (with a warning or error) if someone tries to use notwikis with another kind of session, as for example ApiLogin does at lines 96–107.