Page MenuHomePhabricator

DavidBrooks
User

Projects

User is not a member of any projects.

Today

  • No visible events.

Tomorrow

  • No visible events.

Friday

  • No visible events.

User Details

User Since
Jul 14 2015, 9:27 PM (578 w, 1 d)
Availability
Available
LDAP User
Unknown
MediaWiki User
DavidBrooks [ Global Accounts ]

Recent Activity

Today

DavidBrooks added a comment to T431511: Check for duplicate arguments.

That, and my rule of thumb that the danger of changing old code is linearly proportional to its age, over 11 years in this case.

Wed, Aug 12, 8:06 PM · AutoWikiBrowser

Yesterday

DavidBrooks added a comment to T431511: Check for duplicate arguments.

Well, that may contain enough insight to fix the current case, but with code like this I'd always worry about regressing a different case. There are thirteen unit tests but they may need to be reviewed and extended. For one thing, they don't test existing blank parameters.

Tue, Aug 11, 2:49 PM · AutoWikiBrowser
DavidBrooks added a comment to T431511: Check for duplicate arguments.

According to the description of Templates.RenameTemplateParameters, "Renames parameters in template calls. Does not rename old to new if new paramter [sic] already in use with a value". That's one of the genfixes. It's late, so I haven't read the code or tried a repro, but has anyone else actually checked this?

Tue, Aug 11, 3:41 AM · AutoWikiBrowser

Mon, Aug 10

DavidBrooks added a comment to T401072: AWB won't close or stop.

It seems that this, and similar crashes, arises from AsyncApiEdit:TheThread not being thread-safe [sic]. As a result, its value can change between statements in the Abort() method. This is most likely to happen in a run where the list of articles are read and skipped in quick sequence, and the AWB window is closed while it's happening.

Mon, Aug 10, 4:42 PM · AutoWikiBrowser

Sun, Aug 9

DavidBrooks added a comment to T401072: AWB won't close or stop.

Well, I did find a race condition, but it generates a different exception, and it's cross-thread timing-dependent and unlikely in normal usage. I think we should leave well alone. @OpalYosutebito, OK to resolve this?

Sun, Aug 9, 7:49 PM · AutoWikiBrowser
DavidBrooks moved T401072: AWB won't close or stop from User input needed to Exceptions (unsorted) on the AutoWikiBrowser board.

@OpalYosutebito, yes that helps. It's possible it was in the middle of loading a page (since you suggest it wasn't saving a page) and I suspect a race condition. There's a potential code change because it's using a now-deprecated call, but it hardly seems worth the effort and it's basically an "ain't (really) broke" situation. But I'll try to repro first.

Sun, Aug 9, 3:25 PM · AutoWikiBrowser
DavidBrooks added a comment to T401072: AWB won't close or stop.
Sun, Aug 9, 3:24 PM · AutoWikiBrowser
DavidBrooks moved T401072: AWB won't close or stop from Exceptions (unsorted) to User input needed on the AutoWikiBrowser board.
Sun, Aug 9, 2:49 PM · AutoWikiBrowser
DavidBrooks added a comment to T401072: AWB won't close or stop.

@OpalYosutebito, can you answer some questions. Does this happen frequently or was it just once? How did you close AWB? And after the exception was reported, what state was AWB in?

Sun, Aug 9, 2:49 PM · AutoWikiBrowser

Fri, Aug 7

DavidBrooks added a comment to T431511: Check for duplicate arguments.

By commenting I'm not signing up to address this. But I will point out that Category:Articles using duplicate arguments in template calls has only 21 articles today. It's Category:Pages using duplicate arguments in template calls that has maybe thousands, and seems to be populated mostly by pages in the User and Draft namespaces.

Fri, Aug 7, 8:20 PM · AutoWikiBrowser

Thu, Aug 6

DavidBrooks added a comment to T385747: ArgumentException in ZipFile.ReadEntries.

I can't reproduce this; the callstack suggests a corrupt zipfile. I can say that any version older than 6.2.0.0 has a version of AWBUpdater (2.3.0.0) that will fail, at least on Windows 11. That simply gives you an unhelpful "FAIL" message. Your only recourse then, I think, is to download the newest version yourself.

Thu, Aug 6, 4:11 PM · AutoWikiBrowser

Tue, Aug 4

DavidBrooks added a comment to T433456: ObjectCache.xml is not handled well if it is corrupted.

Adding: a valid ObjectCache.xml file prevents four web requests, totaling about 40K, on AWB startup. The requests then happen only every 5 days. That's barely noticeable in the scheme of things these days, but still the right thing.

Tue, Aug 4, 3:57 PM · AutoWikiBrowser
DavidBrooks closed T433456: ObjectCache.xml is not handled well if it is corrupted as Resolved.

SVN rev 13041. Verified in practice. Both deleting a corrupt file and writing the new file from scratch are redundant (one or the other would do) but I wanted to mirror the existing sequence.

Tue, Aug 4, 2:38 AM · AutoWikiBrowser

Sun, Aug 2

DavidBrooks added a comment to T284574: Add released flag to VersionJSON.

Rev 12617 enabled the "released" flag, and every appropriate entry in the current (5/13/26) VersionJSON has it set, so I'd say we can reverse the test in Updater.cs, yes?

Sun, Aug 2, 10:46 PM · AutoWikiBrowser

Sat, Aug 1

DavidBrooks closed T422290: Wrong cursor position with Find & Replace from Paste More as Resolved.

SVN rev 13040.

Sat, Aug 1, 8:23 PM · AutoWikiBrowser
DavidBrooks closed T372017: AWB reads old writeapi user right, so stops working on wikis when it is removed as Resolved.

This was still open, but it seems to have been fixed some time ago.

Sat, Aug 1, 7:22 PM · AutoWikiBrowser

Fri, Jul 31

DavidBrooks added a comment to T422290: Wrong cursor position with Find & Replace from Paste More.

I did some archeology. Tl;dr: in March 2010 a workaround to fix an ancient bug caused this bug as a side-effect. Yes, it's been with us over 16 years. In July 2012 another change made that older bug moot. So I'll back out that workaround (and a related change) which, as far as I can tell, restore the paste-more/search interaction with no other side-effects.

Fri, Jul 31, 7:34 PM · AutoWikiBrowser

Wed, Jul 29

DavidBrooks claimed T422290: Wrong cursor position with Find & Replace from Paste More.

This happens because, contrary to the documentation, the TextChanged event is not raised when the selected text is changed programmatically. So the event handler, which adjusts the search result, isn't triggered. It's a one-line fix in this case but there could be other places with the same omission.

Wed, Jul 29, 9:01 PM · AutoWikiBrowser
DavidBrooks claimed T433456: ObjectCache.xml is not handled well if it is corrupted.

Fix is ready, but will wait those 5 days to verify a controlled repo.

Wed, Jul 29, 3:49 PM · AutoWikiBrowser
DavidBrooks added a comment to T433456: ObjectCache.xml is not handled well if it is corrupted.

Attaching a bad xml file. The extraneous data shows tags from using other sites, so my guess is that it happens when I don't visit those sites again before the tag expires, making the file shorter and messing up a previously valid file. I just visited a couple of other sites, so will have to wait 5 days to verify the above.

Wed, Jul 29, 3:38 PM · AutoWikiBrowser
DavidBrooks created T433456: ObjectCache.xml is not handled well if it is corrupted.
Wed, Jul 29, 3:06 AM · AutoWikiBrowser

Tue, Jul 28

DavidBrooks closed T391116: "Replace with" frame in "Find and replace" is inaccessible in 6.4.0.0 as Resolved.

Fixed in 6.5.0.0 localization corrections.

Tue, Jul 28, 9:39 PM · Accessibility, Regression, AutoWikiBrowser

Wed, Jul 22

DavidBrooks closed T429731: AutoWikiBrowser performance issues using large lists as Resolved.

SVN 13039. Only recompute the lbArticles horizontal scrollbar when the number of items in the list has changed. This only needs to be done once per paint of the window, which calls Draw_Item between 16 and 22 times. It may be tempting to put it in UpdateNumberOfArticles, but that is called on every list change, while Draw_Item isn't called while the window is minimized.

Wed, Jul 22, 2:35 PM · AutoWikiBrowser

Tue, Jul 14

DavidBrooks closed T432067: AWB article list horizontal scrollbar remains when list is cleared as Resolved.

SVN 13036. UpdateNumberOfArticles was it.

Tue, Jul 14, 6:42 PM · AutoWikiBrowser
DavidBrooks added a comment to T432067: AWB article list horizontal scrollbar remains when list is cleared.

Maybe UpdateNumberOfArticles will be the right place to clear the scrollbar.

Tue, Jul 14, 2:13 AM · AutoWikiBrowser

Jul 13 2026

DavidBrooks created T432067: AWB article list horizontal scrollbar remains when list is cleared.
Jul 13 2026, 9:29 PM · AutoWikiBrowser
DavidBrooks added a comment to T429731: AutoWikiBrowser performance issues using large lists.

Observation: every time (almost) that the lbArticles DrawItem method is called when the item count is the same as last time, the identity of the longest article hasn't changed. The exception, deleting that article and adding a shorter one without an intervening draw of the list, is hard to imagine.

Jul 13 2026, 4:19 PM · AutoWikiBrowser

Jul 3 2026

DavidBrooks updated the task description for T431071: AWB sets up the ServicePoint manager in an inappropriate place and has a small memory leak.
Jul 3 2026, 8:04 PM · AutoWikiBrowser
DavidBrooks added a comment to T429731: AutoWikiBrowser performance issues using large lists.

Agreed the Aggregate method probably uses basically the same logic as the loop but with additional object creation. Having done a lot with LINQ I'm always suspicious these days and want to know what goes in inside, so I'm more inclined to use the C style.

Jul 3 2026, 4:33 PM · AutoWikiBrowser
DavidBrooks updated the task description for T431071: AWB sets up the ServicePoint manager in an inappropriate place and has a small memory leak.
Jul 3 2026, 11:18 AM · AutoWikiBrowser
DavidBrooks created T431071: AWB sets up the ServicePoint manager in an inappropriate place and has a small memory leak.
Jul 3 2026, 1:09 AM · AutoWikiBrowser

Jun 28 2026

DavidBrooks added a comment to T429731: AutoWikiBrowser performance issues using large lists.

SVN 13027: use BeginUpdate to easily prevent flashing when a large number of ReplaceSpecial rules are pasted into the tree. Still to do: prevent the rule detail page flashing too.

Jun 28 2026, 10:46 PM · AutoWikiBrowser
DavidBrooks added a comment to T429731: AutoWikiBrowser performance issues using large lists.

SVN 13026: replace slow LINQ functions with a simple loop to calculate the longest article name. Still to do: keep a running updated in a subclass of ListBox's ObjectCollection. Improvements between 4x and 6x on very long lists.

Jun 28 2026, 10:20 PM · AutoWikiBrowser
DavidBrooks added a comment to T429731: AutoWikiBrowser performance issues using large lists.

SVN 13025: use the ListBox's RemoveAt implementation if <= 100 items are selected. Testing shows that is quicker for long (>500) lists. Further profiling could show the breakeven point for other scenarios, but this must cover the commonest ones.

Jun 28 2026, 10:11 PM · AutoWikiBrowser

Jun 20 2026

DavidBrooks created T429731: AutoWikiBrowser performance issues using large lists.
Jun 20 2026, 6:22 PM · AutoWikiBrowser

Jun 15 2026

DavidBrooks closed T428372: AutoWikiBrowser memory leak when preprocessing a large list as Resolved.

Checked in: SVN 13024.

Jun 15 2026, 4:48 PM · AutoWikiBrowser
DavidBrooks added a comment to T428372: AutoWikiBrowser memory leak when preprocessing a large list.

I realized it wasn't directly an issue with the lambda function. Processing each article creates a ListMaker object, and the constructor hooks it into provider infrastructure, meaning it doesn't get GC'ed when it goes out of scope. That static-with-wrapper solution looks better.

Jun 15 2026, 2:08 AM · AutoWikiBrowser

Jun 14 2026

DavidBrooks created T429084: RemoveTemplateParameter will incorrectly remove some parameters not listed.
Jun 14 2026, 2:21 AM · AutoWikiBrowser
DavidBrooks created T429082: If a template parameter contains a | in a quoted string, parameter-handling method fail.
Jun 14 2026, 2:04 AM · AutoWikiBrowser

Jun 13 2026

DavidBrooks claimed T428372: AutoWikiBrowser memory leak when preprocessing a large list.
Jun 13 2026, 11:42 PM · AutoWikiBrowser
DavidBrooks claimed T397590: AutoWikiBrowser throws System.OutOfMemoryException, followed by empty settings file error.

It seems that handling the OOM exception shows a dialog but leaves the MainWindow processing events as usual. Anything can go wrong (including showing the dialog) so after attempting to show that dialog the program should be fast-failed. Using the normal exit will need memory which may explain the corrupt files.

Jun 13 2026, 11:41 PM · AutoWikiBrowser
DavidBrooks added a comment to T397590: AutoWikiBrowser throws System.OutOfMemoryException, followed by empty settings file error.

While I agree that an exception should not clobber a settings file, it can be hard to do anything sensible if there's no memory to do it. So perhaps the general exception handler should take account of that.

Jun 13 2026, 1:30 AM · AutoWikiBrowser
DavidBrooks added a comment to T428372: AutoWikiBrowser memory leak when preprocessing a large list.

A quick fix: make LMaker static. That works in the above testcase. A more robust solution would be to move the body of NormalizeTitle() to Tools as a static, and wrap it in the existing method in ListMaker for signature compatibility.

Jun 13 2026, 1:21 AM · AutoWikiBrowser

Jun 12 2026

DavidBrooks added a comment to T428372: AutoWikiBrowser memory leak when preprocessing a large list.

The leak starts at revision 12852. My immediate suspicion is the closure on the LMaker local variable in FixSyntax.cs. I have no idea how C# implements the currying, and I don't see why it wouldn't get released, but I'll try a fix (there are various ways of avoiding the closure). If I'm right, the ironies are (a) LMaker is only there because it provides an object to call NormalizeTitle() with (b) the delegate is rarely called anyway.

Jun 12 2026, 5:02 PM · AutoWikiBrowser

Jun 8 2026

DavidBrooks added a comment to T428372: AutoWikiBrowser memory leak when preprocessing a large list.

Apologies: I said I would add the steps, but didn't. They are currently listed on [[:w:en:User talk:Tom.Reding]] but can be listed here if anyone else is interested.

Jun 8 2026, 2:37 PM · AutoWikiBrowser

Jun 7 2026

DavidBrooks created T428372: AutoWikiBrowser memory leak when preprocessing a large list.
Jun 7 2026, 8:18 PM · AutoWikiBrowser

Apr 20 2026

DavidBrooks added a comment to T350636: In a compiled module, a sufficiently complex Regex.Replace can loop if \r characters are still in the article text.

Apologies for the above. Continuing on wikimail.

Apr 20 2026, 9:42 PM · AutoWikiBrowser

Apr 12 2026

DavidBrooks updated subscribers of T350636: In a compiled module, a sufficiently complex Regex.Replace can loop if \r characters are still in the article text.

Guys, do you think it's time for an official 6.4.0.1 release? Some users have been managing with my private builds.

Apr 12 2026, 3:00 PM · AutoWikiBrowser

Apr 6 2026

DavidBrooks added a comment to T421991: Notifications API is returning a permissions error since 2026-04-01 for a bot account.

I realize this task is closed, but I still have a question/problem. Hope someone is still reading.

Apr 6 2026, 3:20 PM · Tool-quickcategories, Notifications (Echo), MediaWiki-Action-API, Traffic
DavidBrooks added a comment to T421991: Notifications API is returning a permissions error since 2026-04-01 for a bot account.

Can the new permission be defaulted to true for normal (not bot) users? It would might simplify things on the client side.

Apr 6 2026, 4:53 AM · Tool-quickcategories, Notifications (Echo), MediaWiki-Action-API, Traffic
DavidBrooks closed T421588: Handle rate limiting in WikiFunctions as Resolved.

SVN 13017: New signatures for Tools.GetHTML() to provide access to the auth information., which will raise the rate from 500/hour. TBD: announce in an appropriate place.

Apr 6 2026, 2:59 AM · AutoWikiBrowser

Apr 4 2026

DavidBrooks added a comment to T421991: Notifications API is returning a permissions error since 2026-04-01 for a bot account.

The AutoWikiBrowser community has been on a wild goose chase since this feature was rolled out. As it is happening the same time as rate limit changes, at first we suspected that (it has a similar appearance in the UI).

Apr 4 2026, 3:33 PM · Tool-quickcategories, Notifications (Echo), MediaWiki-Action-API, Traffic
DavidBrooks added a comment to T421991: Notifications API is returning a permissions error since 2026-04-01 for a bot account.

Can someone explain the rationale for this breaking change? Some users of AutoWikiBrowser are suddenly unable to edit because this new error element stops everything. I think they are using a bot account not for a bot but as a workaround for the introduction of email auth last summer (we addressed that in the tool but not everyone has that fix). And AWB has a genuine bot mode.

Apr 4 2026, 3:23 AM · Tool-quickcategories, Notifications (Echo), MediaWiki-Action-API, Traffic

Mar 31 2026

DavidBrooks updated the task description for T421588: Handle rate limiting in WikiFunctions.
Mar 31 2026, 5:53 PM · AutoWikiBrowser
DavidBrooks added a comment to T421588: Handle rate limiting in WikiFunctions.

Checked in restoration of countdown timer: rev 13016

Mar 31 2026, 5:51 PM · AutoWikiBrowser
DavidBrooks added a comment to T421588: Handle rate limiting in WikiFunctions.

Those fixes accidentally suppressed the status bar countdown in the app. Will fix soon.

Mar 31 2026, 2:02 PM · AutoWikiBrowser

Mar 29 2026

DavidBrooks claimed T421588: Handle rate limiting in WikiFunctions.

Checked in GetHTML silent retries: rev 13015.

Mar 29 2026, 3:15 PM · AutoWikiBrowser

Mar 28 2026

DavidBrooks created T421588: Handle rate limiting in WikiFunctions.
Mar 28 2026, 11:12 PM · AutoWikiBrowser
DavidBrooks added a comment to T412585: Epic: Enforce API rate limits (WE5.1.3c).

is there some way to "force" an error response to test client libraries?

Hm... That is unfortunately not easily done, since the "shadow mode" flag is in the cinfiguration of the rate limiter, it cannot be controlled per request. What we may end up doing is enabling the rate limit only on one route, for testing.

Some way to test this in production would be really helpful to have, especially for complex scenarios like CORS requests (T418969), which are difficult to exactly replicate locally. Maybe there could be a WikimediaDebug option or something.

Mar 28 2026, 10:52 PM · MediaWiki-Core-Platform-Team (Radar), ServiceOps, Traffic, Epic, OKR-Work, MediaWiki-API-Platform-Team, FY2025-26 KR 5.1

Feb 12 2026

DavidBrooks added a comment to T414214: 429 "too many requests" while requesting "what transcludes page" for many templates in AWB.

Fixed on the client side with AWB SVN 13014 (honor Retry-After headers in list generation). This is not tested live however; maybe the hotfix by @Joe dealt with the issue on the server side. Still, it's the right thing to do.

Feb 12 2026, 9:16 PM · Traffic, AutoWikiBrowser
DavidBrooks closed T416505: Fix possible RetryAfter errors in AWB and plugins as Resolved.

SVN 13014.

Feb 12 2026, 1:36 AM · AutoWikiBrowser

Feb 7 2026

DavidBrooks added a comment to T416505: Fix possible RetryAfter errors in AWB and plugins.

I have a simple fix in the ApiMakeList, which should cover the cases listed in T414214. Trying to test it now.

Feb 7 2026, 8:37 PM · AutoWikiBrowser
DavidBrooks added a comment to T414214: 429 "too many requests" while requesting "what transcludes page" for many templates in AWB.

Wikimedia was updated some time last year to return error 429 (Too Many Requests) when someone is using resources too quickly, and the error is accompanied by an advisory pause time (Retry-After header). I've received in it some of my own client-side code, only ever getting a pause time of 1 second. The cure is to wait that period and retry the same call. Success isn't guaranteed though; the pause request is re-evaluated.

Feb 7 2026, 8:21 PM · Traffic, AutoWikiBrowser

Feb 6 2026

DavidBrooks added a comment to T416505: Fix possible RetryAfter errors in AWB and plugins.

Update: it seems the existing fix doesn't apply to the code that processes a list.

Feb 6 2026, 5:01 PM · AutoWikiBrowser

Feb 5 2026

DavidBrooks closed T415566: Remove SecurityAction.Demand decoration from AWB's MainForm class as Resolved.

SVN revision 13013

Feb 5 2026, 8:28 PM · AutoWikiBrowser
DavidBrooks added a comment to T403895: Honor Retry-After HTTP header.

New fix added (SVN 13012). Don't let a RetryAfter header reset the default delay, and allow for a 503 to wait over a minute.

Feb 5 2026, 6:43 PM · AutoWikiBrowser

Feb 4 2026

DavidBrooks added a comment to T414214: 429 "too many requests" while requesting "what transcludes page" for many templates in AWB.

Already mentioned to @Reedy: the current official release should quietly retry any HTTP error after a delay that starts at 5 seconds. and escalates. But it does not honor a RetryAfter header (there is code in the tree to fix that). Also I haven't looked carefully enough at the bot mode path, and/or it could be coming from a custom HTTP submission in that plugin.

Feb 4 2026, 6:13 PM · Traffic, AutoWikiBrowser
DavidBrooks claimed T416505: Fix possible RetryAfter errors in AWB and plugins.
Feb 4 2026, 6:10 PM · AutoWikiBrowser
DavidBrooks created T416505: Fix possible RetryAfter errors in AWB and plugins.
Feb 4 2026, 6:09 PM · AutoWikiBrowser

Jan 27 2026

DavidBrooks added a comment to T413681: API:Login documentation missing clear clientlogin example.

Can you also take on board the discussion in T400002? This was triggered by the enforcement of email OTP and its impact on a specific desktop app, which I first noted in T399860. At the time, there was no guidance on how to handle that via the API.

Jan 27 2026, 4:09 PM · MediaWiki-API-Platform-Team, MediaWiki-Action-API, MediaWiki-Documentation

Jan 26 2026

DavidBrooks created T415566: Remove SecurityAction.Demand decoration from AWB's MainForm class.
Jan 26 2026, 4:37 PM · AutoWikiBrowser

Oct 8 2025

DavidBrooks added a comment to T386430: Revert incorrect size and position values in resource files.

It has been fixed in the source tree, but that has not been pushed as an official build yet. I have an (almost) up to date build at https://github.com/DavidWBrooks/UnofficialAWB/releases/latest. As a bonus there's a build optimized for an ARM64 device.

Oct 8 2025, 9:19 PM · AutoWikiBrowser

Sep 6 2025

DavidBrooks closed T403895: Honor Retry-After HTTP header as Resolved.

Tested using different Retry-After values injected via Fiddler proxy.

Sep 6 2025, 5:56 PM · AutoWikiBrowser
DavidBrooks claimed T403895: Honor Retry-After HTTP header.
Sep 6 2025, 5:48 PM · AutoWikiBrowser
DavidBrooks created T403895: Honor Retry-After HTTP header.
Sep 6 2025, 5:48 PM · AutoWikiBrowser

Sep 3 2025

DavidBrooks added a comment to T400119: Block traffic from user-agents not honoring our policy.

Another question about response 429, sorry. Is there a range of values I can expect for Retry-After? AWB already retries <s>30</s> at least 5 seconds after any 4xx response, and I'd like to know if that needs to be updated to honor the returned value.

Sep 3 2025, 3:26 AM · User-notice-archive, Patch-For-Review, Traffic, SRE

Sep 1 2025

DavidBrooks added a comment to T400119: Block traffic from user-agents not honoring our policy.

Re the comment: "Allow user-agents with contact information" - implies blocking UAs with no contact information. Is this referring to a subset of queries? I understood from earlier that a legacy client-side app with a UA modeled on a browser UA would be OK (unless it runs into a rate limit). Still true?

Sep 1 2025, 3:21 PM · User-notice-archive, Patch-For-Review, Traffic, SRE

Aug 30 2025

DavidBrooks added a comment to T400119: Block traffic from user-agents not honoring our policy.

Re-upping a question I had earlier - will the servers' "Retry-After" header use seconds, or http-date, or potentially either? Of course it would be easy to figure out in my code, but it would still be good to know.

Aug 30 2025, 5:42 PM · User-notice-archive, Patch-For-Review, Traffic, SRE

Aug 26 2025

DavidBrooks added a comment to T400119: Block traffic from user-agents not honoring our policy.

You ask clients to respect HTTP code 429 Too Many Requests. Returning to AutoWikiBrowser: the current code will simply throw a failure here. But if we want it to do something more sensible, some questions.

Aug 26 2025, 3:54 AM · User-notice-archive, Patch-For-Review, Traffic, SRE

Aug 14 2025

DavidBrooks added a comment to T400002: Document how to use the clientlogin and createaccount APIs.

Thanks; I think those steps would be welcome. I already checked the code to handle EmailAuth into the AWB master source, but it hasn't been officially released yet. I will say that the chances of implementing OAuth in the client are slim.

Aug 14 2025, 4:33 PM · MediaWiki-Core-Platform-Team (Kanban), MediaWiki-Core-AuthManager, Documentation

Aug 10 2025

DavidBrooks closed T399860: AWB should handle an EmailAuth OTP on login as Resolved.

Updated to detect EmailAuth installed extension. Finding an OATHAuth-only installation to test with can wait.

Aug 10 2025, 3:35 AM · AutoWikiBrowser

Aug 5 2025

DavidBrooks added a comment to T399860: AWB should handle an EmailAuth OTP on login.

Committed 13001, implementation restricted to en wiki (where we know EmailAuth is turned on). TBD - make it more generic by checking installed extensions for EmailAuth and OATHAuth.

Aug 5 2025, 9:06 PM · AutoWikiBrowser

Aug 3 2025

DavidBrooks reopened T399036: AWB : Ellipsis in French/Russian/Ukrainian not properly managed in AWB "general fixes" as "Open".

Re-opening because the fix causes a build failure in UnitTests Release configuration (use of WikiFunctions:Variables:SetProjectLangCode). That doesn't affect building the app.

Aug 3 2025, 5:02 PM · AutoWikiBrowser

Aug 2 2025

DavidBrooks added a comment to T400002: Document how to use the clientlogin and createaccount APIs.

You can close this (which, remember, is a request to document and thus continue to support the behavior). But, even without documentation, I think the only sensible solution for AWB (and any similar interactive client) is to rely on the current behavior, so I'll keep using the "token" parameter until that breaks.

Aug 2 2025, 3:57 AM · MediaWiki-Core-Platform-Team (Kanban), MediaWiki-Core-AuthManager, Documentation
DavidBrooks closed T400840: AWB should add a user contact to the User-Agent field as Declined.

After discussion in T400119, it seems that the current standard UA will be enough to prevent AWB from being blocked. That may change if an AWB bot goes crazy, in which case we would need to identify the bot in the UA, but it seems unlikely.

Aug 2 2025, 2:08 AM · AutoWikiBrowser

Aug 1 2025

DavidBrooks added a comment to T400119: Block traffic from user-agents not honoring our policy.

There won't be adding some magical regexes trying to ban any single case. We will make the list of user-agent regexes we block public - we want bot operators to adopt an identifiable user agent, so we can tell them apart without requiring authentication.

Aug 1 2025, 6:15 PM · User-notice-archive, Patch-For-Review, Traffic, SRE

Jul 31 2025

DavidBrooks added a comment to T400119: Block traffic from user-agents not honoring our policy.

Oh sorry, I've never used AWB (or windows, in the last few decades). If it's a Windows application, as in used by users to interact with wikipedia, I guess the browser-like format you've used is ok in that case! You don't need to change anything; thanks for taking the time to check!

Jul 31 2025, 3:39 PM · User-notice-archive, Patch-For-Review, Traffic, SRE

Jul 30 2025

DavidBrooks added a comment to T400840: AWB should add a user contact to the User-Agent field.

References task T400119.

Jul 30 2025, 8:58 PM · AutoWikiBrowser
DavidBrooks created T400840: AWB should add a user contact to the User-Agent field.
Jul 30 2025, 8:08 PM · AutoWikiBrowser
DavidBrooks added a comment to T400119: Block traffic from user-agents not honoring our policy.

@Joe I wasn't addressing AWB used as a bot, but as an interactive Windows app. Still, the rest of your comment seems applicable. The contact information would be the user's Wikipedia name (not the AWB authors'). We could prepend :p:ll:User: (p = project, ll = language code) if that would be better. I may need to take advice on bots' ids because I've never used that feature.

Jul 30 2025, 5:18 PM · User-notice-archive, Patch-For-Review, Traffic, SRE
DavidBrooks added a comment to T400119: Block traffic from user-agents not honoring our policy.

AutoWikiBrowser uses the MediaWiki API and User-Agent is WikiFunctions/n.n.n.n (Microsoft Windows NT n.n.n.n; .NET CLR 4.0.n.n). I don't know if that is distinctive enough. I guess a quick fix could be to add the logged-in user, although I'm not completely sure if any API request happens with nobody logged in yet.

Jul 30 2025, 4:25 PM · User-notice-archive, Patch-For-Review, Traffic, SRE

Jul 29 2025

DavidBrooks added a comment to T400002: Document how to use the clientlogin and createaccount APIs.

AWB code is old... it used the login MWAPI until I created the fix, which uses the clientlogin API for general (not bot) use. As you suggest it doesn't use the form descriptor, but gathers the username and password from a UI dialog or its own cache. And, sorry, but I advertised a patched app before I read the above. Several users were flummoxed by the sudden login failures a few weeks ago, and I think some people have resorted to creating a bot name.

Jul 29 2025, 10:12 AM · MediaWiki-Core-Platform-Team (Kanban), MediaWiki-Core-AuthManager, Documentation
DavidBrooks added a comment to T400002: Document how to use the clientlogin and createaccount APIs.

I discovered, by tracing the browser submission (duh) that the fix is to submit the auth code with the "token=**" URL parameter. That works with the clientlogin API, but I'd like a heads-up if it changes.

Jul 29 2025, 8:58 AM · MediaWiki-Core-Platform-Team (Kanban), MediaWiki-Core-AuthManager, Documentation
DavidBrooks added a comment to T399860: AWB should handle an EmailAuth OTP on login.

I discovered the (undocumented and possibly accidental) right Mediawiki API parameters. A crudely coded fix works, but I have to leave for a plane in a few minutes. It needs better error handling, but I maybe able to upload something quickly. Also as the parameters are undocumented it's not necessarily a permanent fix.

Jul 29 2025, 8:55 AM · AutoWikiBrowser

Jul 21 2025

DavidBrooks added a comment to T400002: Document how to use the clientlogin and createaccount APIs.

The reason for wanting this is users of AWB who frequently or occasionally change IP address have started having to either log in to the web interface and authenticate, or (current recommendation) log in to AWB using a newly-created bot account.

Jul 21 2025, 4:49 PM · MediaWiki-Core-Platform-Team (Kanban), MediaWiki-Core-AuthManager, Documentation

Jul 20 2025

DavidBrooks added a comment to T399860: AWB should handle an EmailAuth OTP on login.

I'm wondering whether some wikis will still use OATH. I can put both flows into the code, but it would have to be blind (not sure I can test the OATH path to completion). To do it properly I'd have to look up how to enumerate the wiki's supported extensions.

Jul 20 2025, 4:27 PM · AutoWikiBrowser
DavidBrooks added a comment to T400002: Document how to use the clientlogin and createaccount APIs.

Can any API commitment make it clear whether the 6-digit format will be eternal (or at least what format it will always have). It would be nice to bake that into client-side validation.

Jul 20 2025, 4:22 PM · MediaWiki-Core-Platform-Team (Kanban), MediaWiki-Core-AuthManager, Documentation
DavidBrooks added a comment to T399860: AWB should handle an EmailAuth OTP on login.

Thanks for the pointer, @Reedy. Glad you are more keyed in than me. The Help page has been written, but I should be able to figure out the API.

Jul 20 2025, 2:15 PM · AutoWikiBrowser
DavidBrooks added a comment to T399860: AWB should handle an EmailAuth OTP on login.

I'm most of the way there, but the API doc seems out of date. Following the example at API:Login to submit the OTC (I had to move the logintoken to the POST body), I'm told "Unrecognized parameter: OATHToken" (note - OATH not OAuth). Moving the OATHToken to the body didn't help, neither did a few capitalization changes. I'll try to find some answers in a mediawiki talk - moving to a new IP now.

Jul 20 2025, 9:56 AM · AutoWikiBrowser

Jul 18 2025

DavidBrooks added a comment to T399860: AWB should handle an EmailAuth OTP on login.

There's a problem. The "login" API sends a OTC to the user's email, but that's not documented and there is no indication in the result that this happens. Detecting the failure to log in, and trying with the "clientlogin" API generates a second OTC in the user's email. I can then collect the second code from the interactive user and submit it using clientlogin with the logincontinue parameter. I haven't coded that yet because it destroys the testcase.

Jul 18 2025, 5:30 PM · AutoWikiBrowser