Commit graph

48 commits

Author SHA1 Message Date
Ammar Abdulhamid f79c19acca Replace deprecated IP class with IPUtils
* Bump required MW version to 1.35.0

Bug: T242556
Change-Id: Ia25b7b6f8bc49e4b3d77f9f755b796f09a9aebaf
2020-02-09 07:36:57 +01:00
DannyS712 65757d7025 Use Special:MyLanguage/... for notification link
Bug: T243653
Change-Id: Ia6c71ec042cfbe34117fde1141c9d3ec89af8007
2020-01-25 04:01:01 +00:00
libraryupgrader 3103915e78 build: Updating mediawiki/mediawiki-codesniffer to 29.0.0
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.FunctionComment.MissingParamName
* MediaWiki.Commenting.FunctionComment.MissingParamTag
* MediaWiki.Commenting.FunctionComment.ParamNameNoMatch

Additional changes:
* Also sorted "composer fix" command to run phpcbf last.

Change-Id: Ie0f3c44edd654994ca1aa3c55a40cbef22465c0b
2020-01-14 07:37:43 +00:00
libraryupgrader 19ef39f143 build: Updating mediawiki/mediawiki-phan-config to 0.9.0
Change-Id: I3d27bc41baf88e12c3874d6acc064abd5c847192
2019-12-28 20:12:51 +00:00
Umherirrender 99ed58f71b Fix doc of LoginNotify::generateUserCookieRecord
gmdate would also return string, it also given a string from the caller
site (result from explode)

Change-Id: I1bf314f7ad976e590fdb021c0921dbf7de7504bd
2019-12-13 17:16:23 +01:00
Max Semenik 4a89319c81 Don't use deprecated function IDatabase::getWikiId()
Change-Id: I1d18cff5326d13e3606d13299c84d42c7084125a
2019-06-13 19:41:40 -07:00
Roan Kattouw fd827a88a0 Disable web notifications for login-success
Per Niharika's comment at T220762#5105917, "we don't want an attacker
to learn that we detected an unusual login and cause them to change
the account password or such".

This was already set in WMF's config for LoginNotify; this moves it into
the extension itself, where it belongs.

Bug: T220780
Change-Id: I5adc5a52f10f2f37ae64ff0400c8d77b35d36aa1
2019-04-12 12:54:20 -07:00
Aaron Schulz 93b9ab17aa Use IDatabase for type hints rather than Database
Change-Id: Iafd392f7b33a4cec6013633a520059ba3858a2fe
2019-04-07 19:44:40 +00:00
Aaron Schulz 75773a929b Clean up $params argument to Job subclasses to type hint an array
Change-Id: I4bb19720aa9ea8e1d3da1a3e4e6a89cfe1611a07
2019-03-29 11:46:22 -07:00
Kunal Mehta c5d999a10d Upgrade to newer phan
Bug: T216926
Change-Id: Iadebf5698e8c15db0d0009bd66f55c3b534a192f
2019-03-17 16:17:46 -07:00
Umherirrender 112a8678f6 Use ExtensionRegistry rather than class_exists
Change-Id: If1fb84ccb09ddfc357fae6ca6095b741ac81c0e8
2019-03-03 02:02:00 +01:00
Roan Kattouw fb3db4779b Notifications: Set canNotifyAgent per event type, rather than per event
Depends-On: I4f558654ec23757dd4ecd6986eb3e9a5593f5386
Change-Id: I40cb66596a7285ae9b961f9d85dd940d759b0abd
2018-10-26 17:37:33 -07:00
Gergő Tisza 97bbd18bde
Use accurate count when budling multiple login failure warnings
Bug: T194385
Change-Id: I188e08b31b88d99740231554b9239310c57287ab
2018-08-05 20:50:26 +02:00
Brian Wolff 4a88e8375b Do not send email notice for throttled login attempts
I did the blacklisting throttled instead of whitelisting
wrong password as i didn't want to accidentally miss other
statuses equivalent to wrong password that use different messages

Bug: T193762
Change-Id: I8d51cb5a9c9856f175d31967a7d143836b9d67ee
2018-05-07 16:36:25 +00:00
Huji Lee 0cd8f9e926 Maintenance script to generate fake login attemps from any IP
Depends on: Ifb28222cf75ad23859bbdceff332cf1e526afe9c

Bug: T183722
Change-Id: I01221923387a9e94499efdda39b2e40ee207e27c
2018-02-01 20:10:48 -05:00
Umherirrender 313d2e4af1 Use extension registry to check for CheckUser to be installed
Class was renamed in I39c60b2d059d1cb2c1c0d3a4206232d961536697

Change-Id: I8ca79302b9bbd8999e49a134240420d5cd6117c1
2017-12-15 19:23:06 +01:00
Max Semenik ee5ae41740 Remove compatibility with pre-1.27 MediaWiki
Change-Id: I3f7fd7b11d5f710ae4e940bdddd7001aa6948cf3
2017-10-25 18:26:57 -07:00
Max Semenik e13be59e42 Remove support for per-group preference defaults
Not used and introduces serious compexity, likely causing
the bug with users receiving notifications they've opted out of.

Bug: T174220
Change-Id: I888c6009fffad17121765678387022ed7d454cb0
2017-10-13 17:12:20 -07:00
jenkins-bot d6b547044c Merge "Lazy initialize salt" 2017-08-30 04:49:02 +00:00
Max Semenik 517342ae84 DB_SLAVE -> DB_REPLICA
Change-Id: Id47c23acf22af03964a6899e00a46ebf2088ab8a
2017-08-29 19:58:08 -07:00
Max Semenik 9bc4403bbf Lazy initialize salt
No need to get into cryptography when the salt is needed at most in 50% of
cases.

Change-Id: I3efd7332970005fdd32e47c6177e2e62e2f94a5c
2017-08-25 13:33:40 -07:00
Max Semenik a2b67b38b4 Remove unused import
Change-Id: I791728d08032c03ebbaa84f4c621c9ccd164c3c0
2017-08-25 11:39:49 -07:00
Max Semenik 8acdeae44d Fix check
Bug: T173888
Change-Id: I2643f7cbcdf6c9ad8dff8b6369a5ba6e402684b3
2017-08-24 14:43:10 -07:00
Max Semenik 228a2f3ee3 Even more logging
Bug: T173888
Change-Id: I7f9f3cf0657af100c6ae3a8b2bfb5206b86514eb
2017-08-24 13:56:35 -07:00
jenkins-bot ee7595d2ae Merge "Minor fix for phan 0.8.5" 2017-08-23 22:51:27 +00:00
Brian Wolff 1d81d4a4d5 Use global stash instance instead of local cluster instance
This seems like something that should be global so login
attempts are accumulated across all data centers

At first I thought this might be related to T173888,
but now I don't think so, as logins would be POSTs
so should all be in the master db anyways.

Change-Id: I8d64a8b1c6607cb5b32a25182ec3496477361fdd
2017-08-23 15:26:28 -07:00
jenkins-bot deef3ee3cd Merge "Do not record failures for non-existent accounts" 2017-08-23 21:59:28 +00:00
Brian Wolff a30621f412 Do not record failures for non-existent accounts
Change-Id: I2229f76aa6de0933cd11c6516f0486816f173533
2017-08-23 21:55:45 +00:00
jenkins-bot b29ecb7953 Merge "Add more checks for user existence" 2017-08-23 21:53:57 +00:00
Max Semenik fc6f25c514 Add more checks for user existence
Bug: T173888
Change-Id: Ibcf2dcb867030c0a71534dc0349fb259d04f1706
2017-08-23 14:32:59 -07:00
Brian Wolff 23f4a71831 Fix typo where IP wasn't retrieved from job
I think this might be causing T173888
(Although I don't really know)

Bug: T173888
Change-Id: I8d64a8b1c6607cb5b32a25182ec3496477322fdd
2017-08-23 21:24:28 +00:00
Max Semenik ffae5375df Log the heck out of everything
Bug: T173888
Change-Id: I6cd0a8f953fd823d33bba60df3b9dcfe51d4b4a3
2017-08-22 18:54:10 -07:00
jenkins-bot 8e4b7b0510 Merge "Log usage statistics" 2017-08-16 21:14:34 +00:00
Kunal Mehta a4ac2a85a4 build: Updating mediawiki/mediawiki-codesniffer to 0.11.0
Change-Id: I5f07b7c77f3ee9fd2f8c548630a4800260afd49e
2017-08-10 23:55:11 -04:00
WMDE-Fisch 6651378258 Minor fix for phan 0.8.5
Changed comment to be in line length limit.

Bug: T172935
Change-Id: I2450e3a9f78a10f88854175e68122a8fb7fde395
2017-08-10 19:24:17 +02:00
Umherirrender e123da51eb Improve some parameter docs
Change-Id: I47e04c7e2b773d52289f459f59a46aeb9c4ad12e
2017-08-09 22:20:16 +02:00
Max Semenik 3b9faadf7d Log usage statistics
Bug: T170345
Change-Id: I7ec1214800062d9a22cd3fe0ce2ee9031fc9e21e
2017-07-28 11:09:20 -07:00
Max Semenik 19a2325314 Enqueue jobs postsend
Bug: T170825
Change-Id: I6425a2065693739d117474fb8f60abb0038c8e90
2017-07-19 15:21:33 -07:00
Max Semenik 0a70efc9da Move expensive processing into job queue
Bug: T167731
Depends-On: I618840fafd22d9b6471eb470ef0414e354aa17f5

Change-Id: I1fcd15f523828141e8fadee9a8ad824eacefc0f9
2017-07-11 22:08:53 +00:00
Niharika29 49f42b0e34 Fix bundling issues with LoginNotify
Bug: T169833
Change-Id: Ia38fe0c0eca452af1a9be57e4a4382ebdb9b5a6e
2017-07-11 22:01:21 +00:00
Max Semenik 2d3dca1cc7 Fix message and documentation mismatch
Bug: T170043
Change-Id: I86e5cdb753aeaae1f08a79430499d80ebe9c825d
2017-07-10 15:28:37 -07:00
Matthew Flaschen 12cee85fd8 Remove dead code and messages
Change-Id: Ifbbf6844648940357df41d6998453edfe113c9a8
2017-07-07 22:15:50 +00:00
Max Semenik b9a09fdb13 Make Phan tests pass
Change-Id: Iba9d41e30a68a2ce17ec890e1708a1196eda783d
2017-07-06 17:41:28 -07:00
Niharika29 d283f05ef1 Fix 'Undefined class: LoginNotifyPresentationModel' error
Bug: T168899
Change-Id: Id845fcb5c53a2ac172a86fb4aa1cc8c246c9e19b
2017-06-27 18:16:25 +00:00
Max Semenik 3029d882a5 Add Phan config/make it pass
Test with
   phan -k tests/phan/config.php

Change-Id: I1d567e2a3b4e4834fd2bcf964d40c39740618122
2017-06-20 23:56:12 +00:00
Kunal Mehta 95898fb138 build: Updating mediawiki/mediawiki-codesniffer to 0.9.0
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.FunctionComment.MissingParamComment
* MediaWiki.Commenting.FunctionComment.MissingParamTag
* MediaWiki.Commenting.FunctionComment.ParamNameNoMatch

Change-Id: Iaa239245013b4edb3ddaadf38a6bb97a086044b6
2017-06-20 00:11:29 -07:00
Max Semenik f944f5daf9 Cleanup
* PHPDoc
* Deprecated functions
* Undeclared property

Change-Id: I91ef41257d9bb53e14fbe762ad41798acaa06bb0
2017-06-16 04:15:17 +00:00
Max Semenik 9b3bd403ec Cleanup: namespace this extension, move stuff into includes
Change-Id: I7cf55685de955912c8637681c397179553d17152
2017-06-16 04:15:12 +00:00