Commit graph

18 commits

Author SHA1 Message Date
Reedy 81b69d625a "OATHUserRepository: Stop handling legacy single-key" take 2
This reverts commit 851656bbdf.

Change-Id: I80b20d6105a1f34834a4b60f215313fd53b0195a
2022-03-31 20:46:08 +00:00
Zabe 851656bbdf Revert "OATHUserRepository: Stop handling legacy single-key"
This reverts commit 6898d6ba93.

Reason for revert: the transition is apparently not completed yet

Bug: T305029
Change-Id: Ie5079b25bf4403da7bbe9aaa927f40190904bf20
2022-03-30 12:17:36 +00:00
Reedy 6898d6ba93 OATHUserRepository: Stop handling legacy single-key
Migration is handled by UpdateTables::switchTOTPToMultipleKeys()

The transition has been completed at WMF as well.

Bug: T304375
Change-Id: I0e6d30075dfbd66d692cd8a5e3f7c9ebf44bc065
2022-03-26 09:44:55 +00:00
Reedy 22505f73ae OATHUserRepository: Remove some legacy handling
The migration from `oathauth_users.secret` to `oathauth_users.module`
was added in I71286534d21d950834. It resides now in the UpdateTables
class, which runs from the LoadExtensionSchemaUpdates hook.

The transition has been completed at WMF as well.

Bug: T304375
Change-Id: I5fa88704c6da2ae2679a19e0c5a2cfe7f3bf5f50
2022-03-25 20:38:16 +00:00
Alexander Vorwerk bd8bb22ecd Revert "Explicitly specify SQL columns to SELECT"
This reverts commit 6f37618f4f.

We are later calling isLegacy and that is checking whether
'secret' is set, but due to the change in the select,
'secret' is never set, breaking the functionality of isLegacy().

Change-Id: Ic2c53dca6d1b1608192a5722408f157505187092
2022-03-21 19:11:42 +00:00
jenkins-bot 3043b1eb75 Merge "Send a notification when 2FA is enabled" 2022-03-15 18:32:59 +00:00
Kunal Mehta 6f37618f4f Explicitly specify SQL columns to SELECT
...instead of `SELECT *`, in anticipation of future schema changes.
Notably, we didn't need to select the `id` field, since we don't ever
use it (spotted by Thiemo!).

Change-Id: I1089199bdad70401684377d88877eccc689427f9
2022-02-27 23:15:50 -08:00
Reedy 16bc5d7168 Send a notification when 2FA is enabled
Bug: T301987
Change-Id: I0fe32b735e34753442ec9811ea41d15b76999d87
2022-02-24 00:39:37 +00:00
Reedy 239ff36a06 Add module types to log entries
Change-Id: If765f666496492da44efa282011c2605923be3a2
2022-02-18 00:30:32 +00:00
Kunal Mehta 329c3133d6 Send a notification when 2FA is disabled
Notify users when 2FA is disabled on their account in case something was
fishy about it. This notification is a "system" notification that will
be displayed in the web UI and sent over email. It can't be opted out of
as a preference.

The notification links to Special:Preferences, where users can see their
2FA status and re-enable it if they want. A secondary help link goes to
[[mw:Help:Two-factor authentication]], but can be overridden by
adjusting the "oathauth-notifications-disable-helplink" message. The
notification text is different based on whether the user disabled 2FA on
their own, or an admin used the special page or a maint script to do it.

On Wikimedia wikis, we'll use the WikimediaMessages extension to
customize the messages.

The Echo (Notifications) extension is not required, this will gracefully
do nothing if it's not enabled.

Bug: T210075
Bug: T210963
Change-Id: I99077ea082b8483cc4fd77573a0d00fa98201f15
2022-02-17 00:14:20 -08:00
TChin e95a74035d Replace deprecated CentralIdLookup::factory
Bug: T288836
Change-Id: Iac0492405951d9c6bb21151f2b70f1989bdec027
2021-08-13 12:57:52 -04:00
ZabeMath 7820be3326 Replace uses of DB_MASTER with DB_PRIMARY
Change-Id: Ifd3c5b97b0f519b7f61c8fd76149b1bcd53796d1
2021-05-13 01:25:56 +02:00
Aaron Schulz 33d6671ac3 Cleanup unique keys parameter to IDatabase::replace() calls
Bug: T248147
Change-Id: I030a40ae32bbcda6801bb7a0b8311bbcf3295734
2020-04-17 15:12:19 -07:00
libraryupgrader 5b1a07906a build: Updating mediawiki/mediawiki-codesniffer to 29.0.0
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.FunctionComment.MissingDocumentationPrivate
* MediaWiki.Commenting.FunctionComment.MissingParamName
* MediaWiki.Commenting.FunctionComment.MissingParamTag
* MediaWiki.Commenting.FunctionComment.MissingReturn

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

Change-Id: Idb1b91244e653b2ba2e27bceb3eba769577124a9
2020-01-14 08:27:31 +00:00
libraryupgrader 28c468b1ca build: Updating mediawiki/mediawiki-phan-config to 0.9.0
Change-Id: Iaac7b5f78f26a083e8ad2d12f9c9c4a9ed246283
2019-12-28 14:40:25 +00:00
Dejan Savuljesku 54fc8a0cbf Define fallback for request IP when persisting user
Bug: T237554
Change-Id: I18f57a523a6515f593963a9c149374bd6f6c73b4
2019-12-03 14:34:58 +00:00
Dejan Savuljesku 017d8c8126 Support for multiple keys, improved module form logic #2
Removed unused classes, missed in previous commits

Bug: T218210

Change-Id: Iaf9facb54cd9693f20ed2f48d22b076c4b626705
2019-07-05 20:23:26 +00:00
Dejan Savuljesku ea984e5c2b Refactor the extension to support multiple auth modules
Please note, this patch requires a schema change before merging

Change-Id: I71286534d21d95083436d64d79811943c1a1d032
ERM: #14484
Bug: T218210
2019-06-18 10:45:21 +00:00
Renamed from includes/OATHUserRepository.php (Browse further)