Commit graph

659 commits

Author SHA1 Message Date
libraryupgrader 31d88415ed build: Updating eslint-config-wikimedia to 0.28.0
Change-Id: Ie6f2c6bc7e2ea87076dc9f359c0ffb68d29886fc
2024-06-08 00:34:34 +00:00
Translation updater bot 4af03fbd4b Localisation updates from https://translatewiki.net.
Change-Id: I06abd6655a977864fa0594b60be5cc11d646fde9
2024-05-30 09:36:51 +02:00
Translation updater bot c3825b8182 Localisation updates from https://translatewiki.net.
Change-Id: I19e92faa4636862af95820ad856fedb310a64f36
2024-05-27 09:29:21 +02:00
Translation updater bot 406ccadf65 Localisation updates from https://translatewiki.net.
Change-Id: I081e1dd6fefe75b1aade8f942e026d07c62bd270
2024-05-22 09:20:41 +02:00
libraryupgrader d010411d4a build: Updating grunt-banana-checker to 0.13.0
Change-Id: Id25ea79f90a67ecb9cfc160b2d3cfb1c6656363c
2024-05-18 15:57:24 +00:00
libraryupgrader 9736eb4f16 build: Updating grunt-banana-checker to 0.12.0
Change-Id: I738856a76cdba8ecfa7d8a29e36e838d68b9b153
2024-05-11 01:57:29 +00:00
Translation updater bot 0ab0648958 Localisation updates from https://translatewiki.net.
Change-Id: I32455ed07139dd5b90f868a836805ab05dbc9cae
2024-05-10 09:29:18 +02:00
libraryupgrader f28fa8915d build: Updating composer dependencies
* mediawiki/minus-x: 1.1.1 → 1.1.3
* php-parallel-lint/php-parallel-lint: 1.3.2 → 1.4.0

Change-Id: Ied0958fb8376a7a18dd8ad4c661f26477d944bd1
2024-05-05 21:59:42 +00:00
Translation updater bot bc05842dea Localisation updates from https://translatewiki.net.
Change-Id: I848dbfaf89c7c73ea42097fb95d9a4f00a188eca
2024-04-26 09:48:33 +02:00
jenkins-bot 9dc76fbf83 Merge "Use loginnotify_seen_net table by default" 2024-04-24 07:16:01 +00:00
Translation updater bot 47118f0ef2 Localisation updates from https://translatewiki.net.
Change-Id: I76509cea34aa430e83acf0925dc6f9393d393ad5
2024-04-22 09:28:45 +02:00
libraryupgrader 2a07d8896d build: Updating eslint-config-wikimedia to 0.27.0
Change-Id: Id21110fd0f3b6fedba623a49740c23703055b9cb
2024-04-19 01:03:01 +00:00
Dreamy Jazz 8afd8f865c Use loginnotify_seen_net table by default
Why:
* Because of schema changes being made in CheckUser, the cu_changes
  table will soon only contain rows for edit-like actions. Log
  events, including successful login attempts, will be stored to
  the cu_log_event and cu_private_event tables.
* As the integration with CheckUser is being removed, it does not
  make sense to add support to read data from these tables.
  Furthermore, the schema changes should not break LoginNotify
  which means that no changes are needed to prevent server errors.
* As such, making wikis use the loginnotify_seen_net table by
  default should mean that only third-party wikis which understand
  the deprecation would still continue to use the CheckUser
  integration.

What:
* Set wgLoginNotifyUseSeenTable as true and
  wgLoginNotifyUseCheckUser as false in extension.json

Bug: T362321
Change-Id: Ic1e81c547b6e7e3d012aa91c6bcd2e4b4d0913b5
2024-04-11 13:02:44 +01:00
Translation updater bot caa84fe162 Localisation updates from https://translatewiki.net.
Change-Id: I49527984d35a7d70dc348a94c14cc9267ab69374
2024-04-09 09:27:05 +02:00
Translation updater bot 57dcb88c04 Localisation updates from https://translatewiki.net.
Change-Id: Ifca17a9b436c3fab67cfe3ffec509ed4f9aff393
2024-04-08 09:26:14 +02:00
Translation updater bot f711c0c05c Localisation updates from https://translatewiki.net.
Change-Id: I2174b268304fcf823587b754b43dec21c75e8efa
2024-03-26 08:20:03 +01:00
Translation updater bot 58da740494 Localisation updates from https://translatewiki.net.
Change-Id: If236842d04df119ed8df070c1b56a5bbc1ca4c66
2024-03-18 08:31:18 +01:00
Umherirrender 0cf9669e85 build: Upgrade mediawiki/mediawiki-codesniffer to v43.0.0
Change-Id: Ibad3f653c0b78249eff781596c567182cce281c6
2024-03-11 19:29:34 +01:00
Translation updater bot 7ae7e22e54 Localisation updates from https://translatewiki.net.
Change-Id: I0f0f96ee1ed2d6ce0de49ce5a140d5f0d834057f
2024-03-06 08:19:57 +01:00
Translation updater bot 2c6dbe2d2f Localisation updates from https://translatewiki.net.
Change-Id: I5a6028f73ae4b5b8f11ca399681b0a3a6d7e52b8
2024-03-05 08:27:49 +01:00
Umherirrender 7fdd24ac9b Use LogicException instead of Exception
Change-Id: I7fcf5e33d1db4d137b0275b0a11f4d69db619515
2024-02-21 22:46:45 +01:00
jenkins-bot c54cea398a Merge "build: Updating dependencies" 2024-02-17 22:49:18 +00:00
libraryupgrader b6289eea14 build: Updating dependencies
composer:
* mediawiki/mediawiki-phan-config: 0.12.1 → 0.14.0

npm:
* grunt-banana-checker: 0.11.0 → 0.11.1

Change-Id: I831a3db961171cba3fd62861a5f6f596d7c51a32
2024-02-16 18:34:43 +00:00
Tim Starling fc9a494f29 Use Database::expr()
Bug: T350980
Change-Id: I369778002a880f1547940a097d96e55bcba9a08d
2024-02-16 14:20:53 +11:00
libraryupgrader e845943d60 build: Updating npm dependencies
* eslint-config-wikimedia: 0.25.0 → 0.26.0
* grunt-eslint: 24.0.1 → 24.3.0

Change-Id: I4e85a5f0b473442f479b06dbcdf2d9d893aee13b
2024-02-09 07:03:19 +00:00
libraryupgrader 624c4002b3 build: Updating npm dependencies
* eslint-plugin-compat: 4.0.2 → 4.2.0
  * https://github.com/advisories/GHSA-c2qf-rxjj-qqgw
  * https://github.com/advisories/GHSA-c2qf-rxjj-qqgw
  * https://github.com/advisories/GHSA-c2qf-rxjj-qqgw
* semver: 7.3.5 → 7.5.4
  * https://github.com/advisories/GHSA-c2qf-rxjj-qqgw
  * https://github.com/advisories/GHSA-c2qf-rxjj-qqgw
  * https://github.com/advisories/GHSA-c2qf-rxjj-qqgw
* word-wrap: 1.2.3 → 1.2.5
  * https://github.com/advisories/GHSA-j8xg-fqg3-53r7

Change-Id: I89e57e6bea74bfd3a0875cf927cbfefff3f58929
2024-02-04 03:12:57 +00:00
Reedy d96e30ec80 LoginNotify: Simplify returns in getMinExpiredId()
Follows-Up: Iea716e660353f16c47f873fe42edc2aeec1b4346
Change-Id: Ie351a210eea4eaf4101930fb18e6e149d4294ab4
2024-01-24 22:11:55 +00:00
Umherirrender 7a424d1fdb Stop writing to tablesUsed in tests
Bug: T351733
Change-Id: I6bb37ef79caac7738e70eed54554790deb762149
2024-01-20 12:30:57 +01:00
James D. Forrester 60a0218a1a build: Update MediaWiki requirement to 1.42
All extensions in the MediaWiki tarball are expected to track MediaWiki's release directly.

Change-Id: I57fbf5626575b7f1d7df67f6aecbb99d04504210
2024-01-12 14:12:07 -05:00
Umherirrender 160368a296 Use namespaced classes
Changes to the use statements done automatically via script
Addition of missing use statement done manually

Change-Id: I8943e4e63fb41ca758c9ed25a4abb7664e13bb9f
2024-01-06 17:07:32 +01:00
jenkins-bot 255ab2d74f Merge "tests: Pass HideUserUtils to LocalIdLookup" 2023-12-30 21:32:12 +00:00
Translation updater bot cfe84ef605 Localisation updates from https://translatewiki.net.
Change-Id: Iec1178ea12d43afe8859832eabd55de6edbd6d89
2023-12-22 17:46:18 +01:00
Umherirrender 19c781b681 tests: Pass HideUserUtils to LocalIdLookup
Follow-Up: I408acf7a57b0100fe18c455fc13141277a598925
Change-Id: I4f0190b416873a2aae0c579750b4999ba91baa17
2023-12-15 23:31:12 +01:00
Translation updater bot eba0733bf9 Localisation updates from https://translatewiki.net.
Change-Id: Ica5c7703811a4bdacd44e936cadc23d66bb64aeb
2023-12-01 09:39:58 +01:00
Translation updater bot 22f6c20d61 Localisation updates from https://translatewiki.net.
Change-Id: Ifd607c452cc61c7978c55a0006383dee643b25b3
2023-11-08 13:07:51 +01:00
Translation updater bot 0fac3fc8d0 Localisation updates from https://translatewiki.net.
Change-Id: I8767e07d68b95441c9a3229c18fe6206fa9dba7f
2023-10-27 09:20:37 +02:00
Tim Starling 6f32dafbc1 Use the new DatabaseVirtualDomains feature
Change-Id: I05b6361bd57ba6754bd308e04da1c635f95d042b
2023-10-26 14:50:22 +11:00
Umherirrender 70703bdce3 build: Add @phan-var to handle varying return value of hash_hmac
Since php8.0 hash_hmac throws exception and does not return false
Reported by phan running with php8.1

Change-Id: I2374daf5e0954bef91da65454d973ef3d1eb2183
2023-10-06 19:25:35 +02:00
Translation updater bot 2f4996cf14 Localisation updates from https://translatewiki.net.
Change-Id: Ia5de941b15cc8279af27e79746a423dee466a126
2023-10-02 10:57:39 +02:00
jenkins-bot fac8b00395 Merge "Don't notify of failed logins for system or temporary users" 2023-09-13 09:54:54 +00:00
jenkins-bot 79f766d525 Merge "LoginNotify seen subnets table" 2023-09-13 09:54:52 +00:00
Translation updater bot 923c328594 Localisation updates from https://translatewiki.net.
Change-Id: I0527c9666dabc3c4cfe2db9f8722d3fb62f04d1b
2023-09-06 08:42:32 +02:00
Tim Starling a0a387d195 Don't notify of failed logins for system or temporary users
Bug: T329774
Change-Id: I65fa3da22f45002e013d3bd5c8b0efda5f8b5edb
2023-09-04 17:01:52 +10:00
Tim Starling 534e3ce4b3 LoginNotify seen subnets table
Add a table which stores a summary of each user's IP address subnet in
each time bucket, defaulting to 15 days. On edit (and other changes
causing a recentchanges row) and successful login update the table.

On attempted login, check whether the subnet is in the table in any
time bucket back to the expiry time.

Add a job and a maintenance script for purging expired rows.

Disabled by default for now. The idea is to enable it by default after
we have some experience with using it in WMF production.

If CheckUser integration is disabled (the future intended state), the
cache and LoginNotifyChecks job are suppressed since they are
unnecessary.

Details:

* Rename setCurrentAddressAsKnown() to recordKnownWithCookie() and
  split off recordKnown() which does the same thing except without
  sending the cookie. We use recordKnown() to store the IP address
  without sending the cookie, on non-login changes.
* Reorganise isKnownSystemFast() for clarity, and return emphatic
  USER_NOT_KNOWN if the user is not in the table, cache or cookie
  and CheckUser integration is disabled.
* Replace time() calls with a mockable method.

Bug: T345052
Change-Id: Iea716e660353f16c47f873fe42edc2aeec1b4346
2023-09-04 15:04:36 +10:00
Tim Starling 4c369696cc ServiceWiring, dependency injection
* Make LoginNotify into a service. Use a static getInstance() method
  instead of a services container class, since there is only one
  service.
* Removed references to $wgLoginNotifyEnableForPriv. The feature was
  removed in I888c6009fffad1712.

Change-Id: I9120b470d27a0d09e508bd4e12eb2bde2f38d34d
2023-09-04 15:04:36 +10:00
Tim Starling 8521667df9 Doc review and general cleanup
* Remove notification attributes such as title-message, unused since the
  initial commit since it used the new (2015) formatter system.
* isKnownSystemSlow() is always called with a third parameter, and it
  doesn't seem to be nullable in callers.
* Yes, most of the things make sense.
* Add reason why CheckUser has no cuc_ip_hex index.
* Use foreach
* Too late to truncate the hash now

Change-Id: I310bc53ba881842845b9358309954f89c355f81c
2023-09-04 15:04:36 +10:00
Ammarpad 3cd669d148 Hooks: Do not attempt user creation when there's no username
Bug: T345373
Change-Id: I9b7d8dbb67eb9277e121e52a6140773302d74734
2023-08-31 19:00:04 +01:00
Translation updater bot f81e1a7e9d Localisation updates from https://translatewiki.net.
Change-Id: Ieb92fd4c485446cd8534336939c8ec4e3f877bb0
2023-08-28 09:30:22 +02:00
Tim Starling a47af7c73d Fix deprecations and non-static providers
Change-Id: Ia267a93a13191a2289aff70d47c31b2afcb1647b
2023-08-25 15:10:07 +10:00
Tim Starling 40024f461d Updates for new Echo namespace
Change-Id: I6f83b0353bd33a06b2c9c9506c4114de60b9132f
2023-08-24 10:55:15 +10:00