Page MenuHomePhabricator
Feed Advanced Search

Apr 9 2019

Tgr added a comment to T220329: GSoC 2019 Proposal: Build statistics toolset to support WM-HU editor retention grant.

Thanks for applying!

Apr 9 2019, 10:18 AM · Google-Summer-of-Code (2019)
Tgr added a comment to T220330: GSoC 2019 Proposal: Build statistics toolset to support WM-HU editor retention grant.

Thanks for applying! Also, thanks for the additional research links, they were interesting. Some comments:

  • the ability to log wouldn't be really useful here - the data is public, and the queries are not flexible enough to be worth providing some kind of personalization.
  • adding different export formats should not take much time (less than a day)
  • charting probably won't take a week, given that this tool only needs simple line charts
  • "Design the core elements of the app" OTOH will take more time and should be broken up. The funnel data, list of targeted editors and toplist require fairly different code. You should probably pick just one of those for Phase I and aim for an MVP, and do the others later.
Apr 9 2019, 10:17 AM · Google-Summer-of-Code (2019)
Tgr added a parent task for T220458: GSoC 2019 Proposal: Build statistics toolset to support WM-HU editor retention grant: T218277: Build statistics toolset to support WM-HU editor retention grant.
Apr 9 2019, 6:47 AM · Google-Summer-of-Code (2019)
Tgr added a subtask for T218277: Build statistics toolset to support WM-HU editor retention grant: T220458: GSoC 2019 Proposal: Build statistics toolset to support WM-HU editor retention grant.
Apr 9 2019, 6:47 AM · Hungarian-Sites, Technical-Tool-Request, User-Tgr

Apr 8 2019

Tgr claimed T217724: Investigate 2019-03-01 Proton incident.

Better sooner than later I guess, switching over to Proton is a Q4 goal and I'll probably have less time once the MediaWiki REST API project spins up.

Apr 8 2019, 10:23 PM · Patch-For-Review, Product-Infrastructure-Team-Backlog-Deprecated (Kanban), Platform Engineering (Needs Cleaning - Security, stability, performance, and scalability (TEC1)), Proton
Tgr added subtasks for T218277: Build statistics toolset to support WM-HU editor retention grant: T220330: GSoC 2019 Proposal: Build statistics toolset to support WM-HU editor retention grant, T220329: GSoC 2019 Proposal: Build statistics toolset to support WM-HU editor retention grant.
Apr 8 2019, 8:38 PM · Hungarian-Sites, Technical-Tool-Request, User-Tgr
Tgr added a parent task for T220329: GSoC 2019 Proposal: Build statistics toolset to support WM-HU editor retention grant: T218277: Build statistics toolset to support WM-HU editor retention grant.
Apr 8 2019, 8:38 PM · Google-Summer-of-Code (2019)
Tgr added a parent task for T220330: GSoC 2019 Proposal: Build statistics toolset to support WM-HU editor retention grant: T218277: Build statistics toolset to support WM-HU editor retention grant.
Apr 8 2019, 8:38 PM · Google-Summer-of-Code (2019)

Apr 7 2019

Tgr added a comment to T161248: Installation instructions of OAuthAuthentication are useless.

Why is php-curl needed? I'd imagine it uses MediaWiki's request wrapper, which should work fine without curl.

Apr 7 2019, 9:24 PM · Patch-For-Review, MediaWiki-Documentation, Documentation, MediaWiki-extensions-OAuthAuthentication
Tgr added a comment to T213362: Limit what URLs Proton can access.

No, it just needs to be done. They can review at any time if they have the capacity, but Proton is already in production and even if the patch doesn't work it cannot make it *less* secure.

Apr 7 2019, 2:54 AM · Security, Patch-For-Review, Product-Infrastructure-Team-Backlog-Deprecated (Kanban), Platform Team Legacy (Watching / External), Services (watching), Proton
Tgr added a comment to T132901: Use revision scoring to trigger flagged protection.

As a general note, we tend to see ORES as a tool to aid human decision-making, rather than something that replaces human judgment.

Apr 7 2019, 1:35 AM · Hungarian-Sites, MediaWiki-extensions-FlaggedRevs, Machine-Learning-Team
Tgr added a subtask for T132901: Use revision scoring to trigger flagged protection: T218278: Allow FlaggedRevs page stability to be set programmatically based on edit quality.
Apr 7 2019, 1:31 AM · Hungarian-Sites, MediaWiki-extensions-FlaggedRevs, Machine-Learning-Team
Tgr added a parent task for T218278: Allow FlaggedRevs page stability to be set programmatically based on edit quality: T132901: Use revision scoring to trigger flagged protection.
Apr 7 2019, 1:31 AM · MediaWiki-extensions-FlaggedRevs, User-Tgr
Tgr updated the task description for T189537: 2FA reset should log the user out.
Apr 7 2019, 1:24 AM · MW-1.33-notes (1.33.0-wmf.12; 2019-01-08), Trust-and-Safety, MediaWiki-extensions-OATHAuth
Tgr closed T189537: 2FA reset should log the user out as Resolved.
Apr 7 2019, 1:23 AM · MW-1.33-notes (1.33.0-wmf.12; 2019-01-08), Trust-and-Safety, MediaWiki-extensions-OATHAuth

Apr 6 2019

Mill <mill@mail.com> committed rEWOPd5d6978ee74f: r7baaaaaaaaaaa (authored by Tgr).
r7baaaaaaaaaaa
Apr 6 2019, 2:03 AM
Mill <mill@mail.com> committed rEGGA92df32ca7973: v%26baaaaaaaaaaa (authored by Tgr).
v%26baaaaaaaaaaa
Apr 6 2019, 1:18 AM

Apr 4 2019

Tgr added a comment to T119365: Enable Flow for testing on Hungarian Wikipedia.

@kaldari this would be a test deployment (throwaway demo wiki pages only) with the explicit goal of supporting the consultation (giving people a chance of seeing what they are being consulted about).

Apr 4 2019, 10:53 PM · Hungarian-Sites, Growth-Team, User-Tgr, MW-1.27-release (WMF-deploy-2016-03-08_(1.27.0-wmf.16)), Patch-For-Review, Wikimedia-Site-requests, StructuredDiscussions, Collaboration-Team-Triage

Apr 3 2019

Tgr added a comment to T219314: Provide for deleting stale rows from wikimedia_editor_tasks_entity_description_exists.

Yeah, that seems like a good approach.

Apr 3 2019, 11:04 PM · Product-Infrastructure-Team-Backlog-Deprecated, WikimediaEditorTasks
Tgr added a project to T219138: TemplateStyles CSS appears in notification text: RemexHtml.

I think this is a bug in RemexStripTagHandler (called via EchoMentionPresentationModel::getBodyMessage() -> EchoDiscussionParser::getTextSnippet() -> Sanitizer::stripAllTags()) which IMO tends to be used as a rough equivalent of Element.innerText and should behave somewhat along those lines (specifically, hidden elements should be ignored).

Apr 3 2019, 5:35 PM · MW-1.39-notes (1.39.0-wmf.5; 2022-03-28), DiscussionTools, MW-1.38-notes (1.38.0-wmf.16; 2022-01-03), Growth-Team-Filtering, Growth-Team, Notifications, TemplateStyles
Tgr closed T219277: Wikitech password reset flow as Resolved.

The temporary password is stored in the user table, not in LDAP. And the user can't login with it due to $wgBlockDisablesLogin.

Apr 3 2019, 12:56 AM · Security, wikitech.wikimedia.org, MediaWiki-General, Restricted Project
Tgr closed T219277: Wikitech password reset flow, a subtask of T219316: Cannot reset password for Wikitech account, as Resolved.
Apr 3 2019, 12:55 AM · Trust-and-Safety, wikitech.wikimedia.org
Tgr added a comment to T200184: Add visible help link for Special:Notifications at the usual position.

We are still working on various fixes that have been determined to be blockers for restoring Developer account creation. There is no process today to create a new Developer account that is known to work due to some other bugs in the LdapAuthention system. (Namely that generating and sending a temporary password by email does not currently work and normal password reset mechanisms on Wikitech are currently disabled as well pending resolution of T219277).

Apr 3 2019, 12:04 AM · Growth-Team (Sprint 0 (Growth Team)), MW-1.33-notes (1.33.0-wmf.25; 2019-04-09), Patch-For-Review, good first task, Notifications

Apr 2 2019

Tgr added a project to T218220: Make mobileapps & proton swagger spec compliant: Proton.
Apr 2 2019, 9:52 PM · Patch-For-Review, Proton, Product-Infrastructure-Team-Backlog-Deprecated (Kanban)
Tgr added a comment to T57081: Implement support for Flagged Revisions in Pywikibot.

Hi @Jwu96, I was only a helper on this project in the past (see T57081#3995251) and I probably won't be able to do that this year as I have less free time, I'm trying to run another outreach project, (T218277: Build statistics toolset to support WM-HU editor retention grant) and FlaggedRevs is sort-of-disabled on huwiki now (see T121995: Switch FlaggedRevs on Hungarian Wikipedia to a "flagged protection" mode, although that might get reverted soon, and not sure how much it affects the planned Pywikipediabot API). That doesn't mean much, I'm easy to replace; @jayvdb is the main mentor so you should discuss with him what the plans are for this project (AIUI it was grandfathered in to the task list from some previous year so there's no guarantee the people who planned to mentor it then are still planning to do so).

Apr 2 2019, 7:44 PM · Hungarian-Sites, User-Tgr, MediaWiki-extensions-FlaggedRevs, Pywikibot
Tgr added a comment to T218277: Build statistics toolset to support WM-HU editor retention grant.

@Hjhimanshu sorry for taking so long to respond, things got busier at WMCON than expected. Not considering that it's in the middle of the GSoC application period was a planning fail on my side :/

Apr 2 2019, 7:19 PM · Hungarian-Sites, Technical-Tool-Request, User-Tgr
Tgr added a comment to T218302: Choose DB/Cluster for WikimediaEditorTasks tables.

There's nothing private in the table, but probably nothing worth taking up resources for replication, either (functionally it's more or less a materialized view of some of the Wikidata item tables). And maybe at some point there will be some kind of locking mechanism (task X is being held by user Y)? I'd just make it private for now, seems like less hassle. (For which AIUI it would still have to be deleted from $private_tables, and added to [[https://gerrit.wikimedia.org/r/plugins/gitiles/operations/puppet/+/production/modules/role/files/mariadb/filtered_tables.txt|filtered_tables.txt]] instead.)

Apr 2 2019, 6:11 PM · Product-Infrastructure-Team-Backlog-Deprecated, DBA, WikimediaEditorTasks
Tgr added a comment to T219689: Undeprecate User::setPassword().

I still don't see how

$status = $user->changeAuthenticationData( [
    'username' => $user->getName(),
    'password' => $password,
    'retype' => $password,
] );

(what changePassword.php does now) is an unacceptable level of complexity / code duplication compared to $user->setPassword( $password ) (which also cripples error handling for compatibilty with the legacy method signature). Less elegant, sure (if someone wants to improve that, time is probably better spent on making changeAuthenticationData() autofill the username or making the handling of the retype field more intelligent so it's not required when the data does not come from $_GET/$_POST, both of which should be doable), but copying a single method call into your code is not exactly rocket science.

Apr 2 2019, 10:33 AM · MW-1.34-notes (1.34.0-wmf.8; 2019-06-04), Platform Engineering, MediaWiki-Core-AuthManager

Mar 30 2019

Tgr added a comment to T219655: Patrol log entries generated via OAuth are not tagged with OAuth consumer.

Adding new arguments to a hook should be safe, as long as it doesn't alter the handling of the existing ones.

Mar 30 2019, 8:59 AM · MW-1.34-notes (1.34.0-wmf.6; 2019-05-21), MW-1.33-notes (1.33.0-wmf.25; 2019-04-09), MediaWiki-extensions-OAuth, MediaWiki-Change-tagging, MediaWiki-Logevents
Tgr added a comment to T219689: Undeprecate User::setPassword().

setPasswordInternal is private so probably not much help. (setInternalPassword was also internal, as the name suggests, MediaWiki just hasn't been good traditionally about keeping internal methods private.) Password handling via the User class is deprecated, we just don't bother with deprecating non-public methods.

Mar 30 2019, 8:50 AM · MW-1.34-notes (1.34.0-wmf.8; 2019-06-04), Platform Engineering, MediaWiki-Core-AuthManager

Mar 29 2019

Tgr added a comment to T218277: Build statistics toolset to support WM-HU editor retention grant.

Welcome @Hjhimanshu! I'm at a conference, will follow up over the weekend.

Mar 29 2019, 10:55 PM · Hungarian-Sites, Technical-Tool-Request, User-Tgr
awight awarded T133452: RFC: Create temporary accounts for anonymous editors a Love token.
Mar 29 2019, 12:29 AM · Privacy Engineering, TechCom-RFC, User-Tgr, WMF-Legal, Privacy, MediaWiki-Core-AuthManager

Mar 28 2019

zeljkofilipin awarded T217113: MediaWiki-Vagrant should use the same Node.js version as Wikimedia production a Insectivore token.
Mar 28 2019, 3:17 PM · MediaWiki-Vagrant
Tgr added a comment to T91162: RFC: Shadow namespaces.

I agree with this analysis: sharing any "active" content (like templates, modules, user scripts, gadgets, etc) across wikis is going to be more tricky.

Mar 28 2019, 11:38 AM · MediaWiki-General, Wikimedia-Developer-Summit (2017), TechCom-RFC

Mar 27 2019

Tgr added a project to T219459: Provide block templates for common block types: User-Tgr.
Mar 27 2019, 10:49 PM · MediaWiki-Blocks, User-Tgr, Technical-Tool-Request
Tgr added a comment to T219459: Provide block templates for common block types.

We already have MediaWiki:Ipbreason-dropdown which gives common block reasons, so the easiest thing would be to extend or replace that somehow with a JSON page which gives values for the other form fields (and maybe generic per-type UI stuff, like a text box with guidelines / policy references).

Mar 27 2019, 9:53 PM · MediaWiki-Blocks, User-Tgr, Technical-Tool-Request
Tgr updated the task description for T219459: Provide block templates for common block types.
Mar 27 2019, 9:52 PM · MediaWiki-Blocks, User-Tgr, Technical-Tool-Request
Tgr created T219459: Provide block templates for common block types.
Mar 27 2019, 9:51 PM · MediaWiki-Blocks, User-Tgr, Technical-Tool-Request
Tgr added a comment to T190165: $wgForeignFileRepos' ForeignAPIRepo class fetches files from more than one foreign file repo.

You can, it will just behave weirdly if the other foreign repo also uses InstantCommons.

Mar 27 2019, 9:49 PM · MediaWiki-File-management, Commons, Multimedia
Tgr added a comment to T218816: MediaWiki.Commenting.FunctionComment.DefaultNullTypeParam wants null even if type is nullable.

So apparently there is some difference, just not sure what exactly.

Mar 27 2019, 4:57 PM · MediaWiki-Codesniffer
Tgr added a comment to T176739: Map marker is misplaced when loading from MCS.

Supporting the location map feature would be an unreasonable amount of effort for a legacy feature that has now been replaced by proper software support for maps. Other software components don't support them either, see e.g. T193822: Pushpin disappears after opening image in mediaviewer or T64572: Media Viewer and location map overlays. I would suggest declining and pointing people to Maps (Kartographer) as a replacement for the template.

Mar 27 2019, 3:53 PM · Mobile-Content-Service, Android-app-Bugs, Wikipedia-Android-App-Backlog

Mar 26 2019

Tgr added a comment to T219277: Wikitech password reset flow.

Yeah, there's no reason why that wouldn't work, it looks like a legitimate use of password reset from MediaWiki's point of view. I guess it should check whether the user is blocked and $wgBlockDisablesLogin is set.

Mar 26 2019, 8:49 PM · Security, wikitech.wikimedia.org, MediaWiki-General, Restricted Project
Tgr added a comment to T219277: Wikitech password reset flow.

Yeah, there's no reason why that wouldn't work, it looks like a legitimate use of password reset from MediaWiki's point of view. I guess it should check whether the user is blocked and $wgBlockDisablesLogin is set.

Mar 26 2019, 4:49 PM · Security, wikitech.wikimedia.org, MediaWiki-General, Restricted Project
Tgr moved T213362: Limit what URLs Proton can access from Code Review to To Deploy on the Product-Infrastructure-Team-Backlog-Deprecated (Kanban) board.

Moved.

Mar 26 2019, 11:16 AM · Security, Patch-For-Review, Product-Infrastructure-Team-Backlog-Deprecated (Kanban), Platform Team Legacy (Watching / External), Services (watching), Proton

Mar 23 2019

Tgr updated the task description for T64946: Boolean preferences with default value of true cannot be changed if they do not have a key in $wgDefaultUserOptions.
Mar 23 2019, 8:43 PM · Documentation, MediaWiki-Core-Preferences
Tgr added a comment to T219074: WikimediaEditorTasks double-counts edits on the Beta Cluster.
tgr@deployment-deploy01:~$ PHP=php7.2 mwscript shell.php --wiki=wikidatawiki
Psy Shell v0.9.9 (PHP 7.2.16-1+0~20190307202415.17+stretch~1.gbpa7be82+wmf1 — cli) by Justin Hileman
>>> sudo MediaWiki\Extension\WikimediaEditorTasks\Hooks::getCounters()
=> [
     MediaWiki\Extension\WikimediaEditorTasks\WikipediaAppDescriptionEditCounter {#3131},
     MediaWiki\Extension\WikimediaEditorTasks\WikipediaAppDescriptionEditCounter {#3134},
   ]

I'd guess the production config and the extension.json config gets merged together and both have the same rule.

Mar 23 2019, 5:35 PM · MW-1.33-notes (1.33.0-wmf.23; 2019-03-26), Patch-For-Review, Product-Infrastructure-Team-Backlog-Deprecated (Kanban), WikimediaEditorTasks

Mar 22 2019

Tgr added a comment to T215053: Write an extension for displaying Discourse feeds on mediawiki.org.

I theory it's not hard to inject remote changes into the watchlist, Wikidata does that for example. Watchlists are fine-tuned for policing changes to the content maintained by the community though, they are not a generic notification interface (we have Echo for that), so I'd tread with care.

Mar 22 2019, 11:04 PM · MediaWiki-extensions-Discourse, MediaWiki-extension-requests
Tgr added a comment to T212676: Show Discourse notifications in Echo.

As a user registered in a MediaWiki instance and a Discourse instance through the same Wikimedia SUL account, I can receive any web notifications generated by Discourse as MediaWiki notifications.

Mar 22 2019, 11:01 PM · Space (Jan-Mar-2020), User-Tgr, Growth-Team, Discourse, Notifications
Tgr updated the task description for T212676: Show Discourse notifications in Echo.
Mar 22 2019, 10:51 PM · Space (Jan-Mar-2020), User-Tgr, Growth-Team, Discourse, Notifications
Tgr added projects to T218277: Build statistics toolset to support WM-HU editor retention grant: Google-Summer-of-Code (2019), Technical-Tool-Request.
Mar 22 2019, 10:01 PM · Hungarian-Sites, Technical-Tool-Request, User-Tgr

Mar 21 2019

Tgr moved T204577: JsonConfig emits PHP error "Cannot access property on non-object" in JCApi::addStatusConf from Apr 2019 / 1.33.wmf.25+ to Older on the Wikimedia-production-error board.
Mar 21 2019, 11:26 PM · MW-1.35-notes (1.35.0-wmf.4; 2019-10-29), Product-Infrastructure-Team-Backlog-Deprecated (Kanban), User-TheDJ, JsonConfig, Wikimedia-production-error
Tgr moved T204577: JsonConfig emits PHP error "Cannot access property on non-object" in JCApi::addStatusConf from Older to Apr 2019 / 1.33.wmf.25+ on the Wikimedia-production-error board.
Mar 21 2019, 11:26 PM · MW-1.35-notes (1.35.0-wmf.4; 2019-10-29), Product-Infrastructure-Team-Backlog-Deprecated (Kanban), User-TheDJ, JsonConfig, Wikimedia-production-error
Tgr updated the task description for T218926: MediaWiki-Vagrant complains about insecure NIC setting.
Mar 21 2019, 7:00 PM · Security, MediaWiki-Vagrant
Tgr added a comment to T218926: MediaWiki-Vagrant complains about insecure NIC setting.

Adding a default NIC type as suggested in the links does not seem to do anything. Maybe the vagrant box would have to be rebuilt?
Using a newer version of Virtualbox might not be an easy option since Virtualbox provides its own driver and secure boot requires signed drivers. At least the .deb files downloadable from Oracle do not take care of that.

Mar 21 2019, 6:57 PM · Security, MediaWiki-Vagrant
Tgr merged T210764: Vagrant has detected a configuration issue which exposes a vulnerability with the installed version of VirtualBox into T218926: MediaWiki-Vagrant complains about insecure NIC setting.
Mar 21 2019, 6:52 PM · Security, MediaWiki-Vagrant
Tgr merged task T210764: Vagrant has detected a configuration issue which exposes a vulnerability with the installed version of VirtualBox into T218926: MediaWiki-Vagrant complains about insecure NIC setting.
Mar 21 2019, 6:52 PM · Release-Engineering-Team (Kanban), MediaWiki-Vagrant
Tgr updated the task description for T218926: MediaWiki-Vagrant complains about insecure NIC setting.
Mar 21 2019, 6:48 PM · Security, MediaWiki-Vagrant
Tgr updated the task description for T218926: MediaWiki-Vagrant complains about insecure NIC setting.
Mar 21 2019, 6:39 PM · Security, MediaWiki-Vagrant
Tgr updated the task description for T218926: MediaWiki-Vagrant complains about insecure NIC setting.
Mar 21 2019, 6:38 PM · Security, MediaWiki-Vagrant
Tgr created T218926: MediaWiki-Vagrant complains about insecure NIC setting.
Mar 21 2019, 6:38 PM · Security, MediaWiki-Vagrant
Tgr added a comment to T218844: Update Gerrit /r/p/ links to /r/.

there's a related task but I'm unable to find it

Mar 21 2019, 4:56 PM · MW-1.34-notes (1.34.0-wmf.4; 2019-05-07), User-zeljkofilipin, good first task, Documentation, Epic, WMF-General-or-Unknown, Gerrit
Tgr added a comment to T218844: Update Gerrit /r/p/ links to /r/.

Yeah. this is about links which will end up in somebody's git config as a git remote URL (so URL used for git clone, git remote add, .gitmodules and such). Sorry, I should have been clearer.

Mar 21 2019, 4:54 PM · MW-1.34-notes (1.34.0-wmf.4; 2019-05-07), User-zeljkofilipin, good first task, Documentation, Epic, WMF-General-or-Unknown, Gerrit
Tgr added a project to T218844: Update Gerrit /r/p/ links to /r/: Documentation.
Mar 21 2019, 2:56 AM · MW-1.34-notes (1.34.0-wmf.4; 2019-05-07), User-zeljkofilipin, good first task, Documentation, Epic, WMF-General-or-Unknown, Gerrit
Tgr created T218844: Update Gerrit /r/p/ links to /r/.
Mar 21 2019, 2:51 AM · MW-1.34-notes (1.34.0-wmf.4; 2019-05-07), User-zeljkofilipin, good first task, Documentation, Epic, WMF-General-or-Unknown, Gerrit
Tgr added a comment to T193613: RFC: Establish stable interface policy for PHP code.

At this point I'd say, any time you want to use an interface, you should probably use an abstract class instead. (Except maybe if that class is not going to be exposed externally, but then what's the point of an interface in the first place?)

Mar 21 2019, 12:53 AM · TechCom-RFC (TechCom-RFC-Closed), Platform Engineering, Discovery-Search, MediaWiki-General
Tgr added a comment to T52399: {{fullurl:}} and {{SERVER}} when used on mobile do not resolve to commons.m.wikimedia.org but to commons.wikimedia.org.

This task is probably more related to T195494: Handle mobile domains in core than the one it got merged into.

Mar 21 2019, 12:26 AM · MediaWiki-Parser
Mill <mill@mail.com> committed rMLZEc90f4b88ea78: whaaaaaaaaaaaa (authored by Tgr).
whaaaaaaaaaaaa
Mar 21 2019, 12:22 AM
Mill <mill@mail.com> committed rMLZE1e7eb0be420a: vhaaaaaaaaaaaa (authored by Tgr).
vhaaaaaaaaaaaa
Mar 21 2019, 12:22 AM

Mar 20 2019

Tgr added a comment to T218608: OAuth doesn't work when $wgBlockDisablesLogin is true.

For #4, I'd think we can consider the provisional "session user" to be the anon with the request's IP, which would usually convert #4 into #2. I note that's what User::getBlockedStatus() is already trying to do. Can you think of any cases where we wouldn't want to do that?

Mar 20 2019, 8:33 PM · cloud-services-team, Security, MediaWiki-Core-AuthManager, MediaWiki-extensions-OAuth
Tgr added a comment to T218608: OAuth doesn't work when $wgBlockDisablesLogin is true.

Can we find a way to ensure toolsadmin.wikimedia.org doesn't start allowing LDAP user creations when this is fixed? Right now user creation is stopped via wikitech, and is broken there but it would be best to couple the two.

Mar 20 2019, 7:38 PM · cloud-services-team, Security, MediaWiki-Core-AuthManager, MediaWiki-extensions-OAuth

Mar 19 2019

Tgr added a comment to T218608: OAuth doesn't work when $wgBlockDisablesLogin is true.
In T218608#5037102, @Anomie wrote: random

Possibly a good step would be to audit for where $user->getRights() is called on a User object that wasn't created by User::newFromSession(). Some, like API list=allusers and list=users, would be ok, while others may be suspect.

Mar 19 2019, 11:40 PM · cloud-services-team, Security, MediaWiki-Core-AuthManager, MediaWiki-extensions-OAuth
Tgr added a comment to T218608: OAuth doesn't work when $wgBlockDisablesLogin is true.

Internally the request passed to User::newFromSession() is still needed, but I can't think of any need for it to be exposed publicly.

Mar 19 2019, 9:44 PM · cloud-services-team, Security, MediaWiki-Core-AuthManager, MediaWiki-extensions-OAuth
Tgr added a comment to T218608: OAuth doesn't work when $wgBlockDisablesLogin is true.

The other option I have been thinking about is moving $wgBlockDisablesLogin handling to SessionManager (which seems like a nice thing to do in general). So

  1. SessionManager calls providers to determine the user identity (and they are not allowed to do block checks)
  2. SessionManager sets the session in User::$mRequest (but not the global request yet; create a DerivativeReuqest, I guess? ugh)
  3. SessionManager checks for blocks (which works because User::$mRequest now has a fully loaded session) and aborts authentication if necessary
  4. SessionManager sets the session for the global request
Mar 19 2019, 5:08 PM · cloud-services-team, Security, MediaWiki-Core-AuthManager, MediaWiki-extensions-OAuth
Tgr added a comment to T218608: OAuth doesn't work when $wgBlockDisablesLogin is true.

One question worth asking is whether User::newFromId( $id )->getRequest() === $wgRequest really makes sense.

Mar 19 2019, 5:03 PM · cloud-services-team, Security, MediaWiki-Core-AuthManager, MediaWiki-extensions-OAuth
Tgr added a comment to T218674: User::getRights() applies session rights restrictions to non-session users.

User::getBlockedStatus has some ugly checks to see whether the User object whose status has been queried is the same as the global user (to determine whether the IP from $wgRequest can be used to check for IP blocks).

Mar 19 2019, 4:49 PM · Platform Team Workboards (MW Expedition), MediaWiki-User-management, MediaWiki-Action-API
Tgr renamed T218608: OAuth doesn't work when $wgBlockDisablesLogin is true from OAuth doesn't work when LDAP is in strict mode to OAuth doesn't work when $wgBlockDisablesLogin is true.
Mar 19 2019, 4:43 PM · cloud-services-team, Security, MediaWiki-Core-AuthManager, MediaWiki-extensions-OAuth
Tgr added a comment to T218608: OAuth doesn't work when $wgBlockDisablesLogin is true.

From IRC, maybe this was a clearer description of the problem: SessionManager asks OAuth to provide a session (= session id + identity of global user) -> OAuth session provider identifies user but wants to return null if user is blocked and $wgBlockDisablesLogin is set -> User::getBlockedStatus() checks whether the user is IP-blocked, which depends on whether the user has ipblock-exempt right -> User::getRights() asks the current session if any rights are revoked by the session provider -> session is not loaded yet, goto step 1

Mar 19 2019, 5:24 AM · cloud-services-team, Security, MediaWiki-Core-AuthManager, MediaWiki-extensions-OAuth
Tgr added a comment to T218608: OAuth doesn't work when $wgBlockDisablesLogin is true.

More precisely:

  • SessionManager tries to determine the session user during setup phase.
  • The OAuth session provider reads the user ID, loads the user and checks whether the user is blocked.
  • User::getBlockedStatus() calls User::isAllowed() (before checking whether the session user is safe to load), that tries to call Session::getAllowedUserRights() (which is used by OAuth and similar extensions to limit user rights based on the authentication method), but getting the session triggers another call to the session provider, and a loop.

So the actual user object being checked here is actually safe to load (it's loaded by ID, it isn't the session user) but that doesn't help.

Mar 19 2019, 3:31 AM · cloud-services-team, Security, MediaWiki-Core-AuthManager, MediaWiki-extensions-OAuth
Tgr added a comment to T218608: OAuth doesn't work when $wgBlockDisablesLogin is true.

So, when OAuth is trying to authenticate the user and calls User::getBlockedStatus, that calls User::isAllowed, which triggers another authentication (the user will be cached in the WebRequest object, but only when the WebRequest::getSession call towards the top of the stack returns). Ugh. If the nonce check didn't fail, this would result in a loop.

Mar 19 2019, 3:02 AM · cloud-services-team, Security, MediaWiki-Core-AuthManager, MediaWiki-extensions-OAuth
Tgr added a comment to T218608: OAuth doesn't work when $wgBlockDisablesLogin is true.
2019-03-19 02:37:41 [ce9c80f20243ddb8e2ae939f] labweb1001 labswiki 1.33.0-wmf.21 OAuth INFO: DEBUG-T218608 {"used":false} 
[Exception Exception] (/srv/mediawiki/php-1.33.0-wmf.21/extensions/OAuth/backend/MWOAuthDataStore.php:130) 
  #0 /srv/mediawiki/php-1.33.0-wmf.21/extensions/OAuth/lib/OAuth.php(759): MediaWiki\Extensions\OAuth\MWOAuthDataStore->lookup_nonce(MediaWiki\Extensions\OAuth\MWOAuthConsumer, MediaWiki\Extensions\OAuth\MWOAuthToken, string, string)
  #1 /srv/mediawiki/php-1.33.0-wmf.21/extensions/OAuth/lib/OAuth.php(707): MediaWiki\Extensions\OAuth\OAuthServer->check_nonce(MediaWiki\Extensions\OAuth\MWOAuthConsumer, MediaWiki\Extensions\OAuth\MWOAuthToken, string, string)
  #2 /srv/mediawiki/php-1.33.0-wmf.21/extensions/OAuth/lib/OAuth.php(611): MediaWiki\Extensions\OAuth\OAuthServer->check_signature(MediaWiki\Extensions\OAuth\MWOAuthRequest, MediaWiki\Extensions\OAuth\MWOAuthConsumer, MediaWiki\Extensions\OAuth\MWOAuthToken)
  #3 /srv/mediawiki/php-1.33.0-wmf.21/extensions/OAuth/backend/MWOAuthServer.php(268): MediaWiki\Extensions\OAuth\OAuthServer->verify_request(MediaWiki\Extensions\OAuth\MWOAuthRequest)
  #4 /srv/mediawiki/php-1.33.0-wmf.21/extensions/OAuth/api/MWOAuthSessionProvider.php(89): MediaWiki\Extensions\OAuth\MWOAuthServer->verify_request(MediaWiki\Extensions\OAuth\MWOAuthRequest)
  #5 /srv/mediawiki/php-1.33.0-wmf.21/includes/session/SessionManager.php(466): MediaWiki\Extensions\OAuth\MWOAuthSessionProvider->provideSessionInfo(WebRequest)
  #6 /srv/mediawiki/php-1.33.0-wmf.21/includes/session/SessionManager.php(191): MediaWiki\Session\SessionManager->getSessionInfoForRequest(WebRequest)
  #7 /srv/mediawiki/php-1.33.0-wmf.21/includes/WebRequest.php(750): MediaWiki\Session\SessionManager->getSessionForRequest(WebRequest)
  #8 /srv/mediawiki/php-1.33.0-wmf.21/includes/session/SessionManager.php(130): WebRequest->getSession()
  #9 /srv/mediawiki/php-1.33.0-wmf.21/includes/Setup.php(816): MediaWiki\Session\SessionManager::getGlobalSession()
  #10 /srv/mediawiki/php-1.33.0-wmf.21/includes/WebStart.php(77): include(string)
  #11 /srv/mediawiki/php-1.33.0-wmf.21/api.php(35): include(string)
  #12 /srv/mediawiki/w/api.php(3): include(string)
  #13 {main}
Mar 19 2019, 2:42 AM · cloud-services-team, Security, MediaWiki-Core-AuthManager, MediaWiki-extensions-OAuth
Tgr added a comment to T204747: UserMerge: Code Stewardship Review.

If UserMerge is no longer supported, how do you do to remove spam users with the API?

Mar 19 2019, 1:47 AM · Stewards-and-global-tools, MediaWiki-extensions-UserMerge, Code-Stewardship-Reviews

Mar 18 2019

Tgr added a comment to T165795: Ldap auth extension vs. ldap vs. username Case.

We need a method that returns all case variants of a name that exist in LDAP; the rest of the patch does not require familiarity with LDAP. If that list is empty, allow user creation; if the list is exactly one element, only allow login/creation if it matches the casing provided by the user (since providers cannot change the casing of the MediaWiki user); if it's larger, probably just log and die. Also return the list in providerNormalizeUsername() for account creation UI checks.

Mar 18 2019, 11:51 PM · cloud-services-team (Kanban), User-bd808, MediaWiki-extensions-LdapAuthentication, wikitech.wikimedia.org
Tgr added a comment to T208988: Fix Flow random test failures.

Same issue in https://integration.wikimedia.org/ci/job/wmf-quibble-core-vendor-mysql-hhvm-docker/10779/console (for 497357):

16:24:01 ResourceLoaderFileModule::readStyleFile: style file not found: "/workspace/src/extensions/VisualEditor/lib/ve/lib/color-picker/color-picker.css"
...
16:24:01 Message 'visualeditor-diff-no-changes' required by 'ext.visualEditor.mwsave' must exist
Mar 18 2019, 11:44 PM · Growth-Team-Filtering, MW-1.34-notes (1.34.0-wmf.10; 2019-06-18), Growth-Team, User-kostajh, StructuredDiscussions
Tgr added a subtask for T159299: Deprecate and remove $wgUser: T218555: Provide access to WebRequest and associated information via a service object.
Mar 18 2019, 11:28 PM · Platform Team Workboards (Epics), Epic, MW-1.35-notes (1.35.0-wmf.26; 2020-03-31), User-DannyS712, Technical-Debt (Deprecation process), MediaWiki-User-management
Tgr added a parent task for T218555: Provide access to WebRequest and associated information via a service object: T159299: Deprecate and remove $wgUser.
Mar 18 2019, 11:28 PM · TechCom, MediaWiki-libs-Services, Platform Team Initiatives (Decoupling (CDP2))
Tgr added a comment to T159299: Deprecate and remove $wgUser.

We don't really have a good replacement for $wgUser right now; that will be provided by T218555: Provide access to WebRequest and associated information via a service object. There are benefits in switching to RequestContext, but it also means having to work twice.

Mar 18 2019, 11:28 PM · Platform Team Workboards (Epics), Epic, MW-1.35-notes (1.35.0-wmf.26; 2020-03-31), User-DannyS712, Technical-Debt (Deprecation process), MediaWiki-User-management
Tgr added a comment to T218608: OAuth doesn't work when $wgBlockDisablesLogin is true.

There are no wikitech log records whatsoever in logstash, probably something is broken there.

Mar 18 2019, 11:26 PM · cloud-services-team, Security, MediaWiki-Core-AuthManager, MediaWiki-extensions-OAuth
Tgr added a comment to T218278: Allow FlaggedRevs page stability to be set programmatically based on edit quality.

Thanks! I couldn't remember where I heard about that.

Mar 18 2019, 9:03 AM · MediaWiki-extensions-FlaggedRevs, User-Tgr
Tgr updated the task description for T218278: Allow FlaggedRevs page stability to be set programmatically based on edit quality.
Mar 18 2019, 8:10 AM · MediaWiki-extensions-FlaggedRevs, User-Tgr
Tgr updated the task description for T218278: Allow FlaggedRevs page stability to be set programmatically based on edit quality.
Mar 18 2019, 8:07 AM · MediaWiki-extensions-FlaggedRevs, User-Tgr
Tgr moved T218277: Build statistics toolset to support WM-HU editor retention grant from Backlog to Huwiki on the User-Tgr board.
Mar 18 2019, 7:33 AM · Hungarian-Sites, Technical-Tool-Request, User-Tgr
Tgr moved T218278: Allow FlaggedRevs page stability to be set programmatically based on edit quality from Backlog to Huwiki on the User-Tgr board.
Mar 18 2019, 7:32 AM · MediaWiki-extensions-FlaggedRevs, User-Tgr
Tgr added a project to T218277: Build statistics toolset to support WM-HU editor retention grant: Outreach-Programs-Projects.
Mar 18 2019, 7:29 AM · Hungarian-Sites, Technical-Tool-Request, User-Tgr

Mar 16 2019

nshahquinn-wmf awarded T215042: Set up a hosted Matrix.org / Element instance on modular.im a Love token.
Mar 16 2019, 4:45 AM · Matrix, User-Tgr
Tgr committed rMLZEa9fc4061a15e: Use standard 'use' notation.
Use standard 'use' notation
Mar 16 2019, 2:36 AM
Tgr committed rMLZEd118dcc45b80: Expose getElementsById/getElementsByTagName.
Expose getElementsById/getElementsByTagName
Mar 16 2019, 2:36 AM
Tgr added a comment to T118774: No way to force a user to change their password if it's invalid.

Do we consider this good enough for enabling on Wikimedia wikis and/or core, or are we holding out for a more complex version that includes a grace period?

Mar 16 2019, 1:35 AM · SecTeam-Processed, Security, MW-1.33-notes (1.33.0-wmf.21; 2019-03-12), MediaWiki-User-login-and-signup
Tgr added a comment to T218432: LinkTarget should have an equals() method.

Well, it's an interface so it shouldn't assume that the implementation is always the same (and at least during the transition from Title to TitleValue it might not be). Also even if the two objects are of the same type, pure object comparison is not really reliable: === will differentiate between two instances of the same title, and == will do a recursive field equality check which might fail if e.g. comparing a fully loaded and a not fully loaded Title.

Mar 16 2019, 12:23 AM · MediaWiki-General, Patch-Needs-Improvement, Platform Team Initiatives (Decoupling (CDP2))
Tgr edited projects for T218449: Determine new password requirements for MediaWiki core, added: MediaWiki-Core-AuthManager; removed MediaWiki-extensions-Auth_remoteuser.
Mar 16 2019, 12:17 AM · Security, MediaWiki-Core-AuthManager, MediaWiki-User-login-and-signup

Mar 15 2019

Tgr added a comment to T151425: Enlarge Popular Password File to 100,000 entries and enforce the new minimum in the config.

although we might want to change it to have suggestChangeOnLogin => true for the default policy group (and false for the others), per above.

Mar 15 2019, 10:11 PM · User-notice-archive, MW-1.34-notes (1.34.0-wmf.22; 2019-09-10), Patch-For-Review, Security-team-backlog, MediaWiki-User-login-and-signup