Commit graph

10 commits

Author SHA1 Message Date
jenkins-bot 7cfed13f4f Merge "Make Nuke tag translatable" 2024-11-14 15:33:32 +00:00
Chlod Alejandro a5e92ffbfd
Make Nuke tag translatable
Adds `tag-nuke` and `tag-nuke-description` messages for user in
Special:Tags and changes the canonical tag name to "nuke" instead
of "Nuke".

Bug: T379168
Change-Id: Ic8846781cdac3bf08c6733f39d0cc5988fb09f6a
2024-11-14 00:52:11 +08:00
Chlod Alejandro 41d31c3076
Use revision table instead of recentchanges
This switches Nuke over to using the `revision` table instead
of `recentchanges`, allowing a wider timespan of pages to be
deleted. As a DoS prevention measure, this adds the
`$wgNukeMaxAge` config option (defaulted to the value of
`$wgRCMaxAge`) and a max execution time for the SELECT
(set to `$wgMaxExecutionTimeForExpensiveQueries`).

This also adds a relevant test.

Partially based off of I6c2b7e6b695d58a7dcba93ccaeba9ed35d81cf80.

Bug: T379147
Co-Authored-by: Kgraessle <kgraessle@wikimedia.org>
Change-Id: I5d68d2663751783bcc773799e951f74866ceb722
2024-11-13 02:14:03 +08:00
Kosta Harlan f1d53c8244
SpecialNuke: Display username next to pages for temp accounts
Why:

- When deleting pages created by temporary accounts via inputting an IP
  address, it's useful to see which temporary accounts were involved in
  creating the pages. This is currently not displayed because
  $row->rc_user_text is not set

What:

- Fetch the actor_name field unconditionally
- Display the page using the actor_name field
- Update tests for the change

Bug: T342785
Change-Id: Ic4112985874343ede78c4571bdfccc58977c5345
2024-10-28 21:06:57 +01:00
jenkins-bot dd5715525e Merge "Tag deletion logs performed with Nuke" 2024-10-22 03:38:45 +00:00
jsn 98aa8d9942
Enable temp account lookup by IP address
- Adds a soft dependency on CheckUser
- Lists pages created by IP user or temp acccounts associated with IP
  address when the lookup is available

Bug: T342785
Depends-On: I45a18f1fcf1a17bdaeefabebcd2f67a946a2cc2e
Change-Id: Idcdd7d787180e8e99fdcbe856e4fc237d9721824
2024-10-21 10:18:32 +02:00
Kgraessle e42a881976 Tag deletion logs performed with Nuke
Bug: T366068
Change-Id: I3455fab45698884d0b32f0065aaaf9fe7c0c6916
2024-10-17 08:53:59 -05:00
Kosta Harlan 3bc28520af
HooksTest: Add missing service argument to SpecialContributions
Change-Id: Ic071120172bf139af9c9d32a7966cd8b0b57cc7c
2024-10-17 13:25:18 +02:00
Matěj Suchánek 68269df6ea Use SpecialPageFactory in SpecialNukeTest
Core's SpecialLog is not @newable, therefore the constructor
may change without notice (which has apparently happened
in 07db710).

Change-Id: I91964bcd787201c89c5eb6f623daba86d8d28d3e
2024-08-12 18:59:44 +02:00
Chlod Alejandro a0eb145847
Add tests for hook handler
This *should* get Nuke to 100% line coverage now.

Also moves SpecialNukeTest to an integration/ subfolder, and makes
applicable changes, since there's now two integration tests.

Follow-Up: Ic15d4431dc8509ac2732ebce7517522e27d8f5a3
Change-Id: I4355b12647cb1a4cc163467d23166d7fa1aade9e
2024-05-22 01:25:05 +08:00