Go to file
Dreamy Jazz 774f4f02ef Create protected variable access logs POSTSEND
Why:
* The ProtectedVarsAccessLogger::logViewProtectedVariableValue
  method creates a debounced log entry for accessing protected
  variable values.
* This log can be created when a user calls the 'abuselog' query
  API. This API query is made using a GET request.
* Because the ProtectedVarsAccessLogger creates the log
  when it is called, the TransactionProfiler raises a warning
  about writing to the primary DB on a GET request.
* We should address this warning by creating the log entry on
  POSTSEND, in a similar way to how the CheckUser extension
  creates CheckUser log entries.

What:
* Wrap the call to ProtectedVarsAccessLogger::log in
  ::logViewProtectedVariableValue with a DeferredUpdate callback
  that is run POSTSEND.
** As part of this, the expectations that the code only uses the
   replica DBs are silenced inside the DeferredUpdate as the
   PostSend-GET expectations do not usually allow for writes.
   The only other method would to be create the log via a job,
   but we want the log creation to occur quickly and reliably.

Bug: T379083
Change-Id: If14e65b27b0bdd4fd0b99319024ffa281bf44656
2024-11-11 14:33:47 +00:00
.phan phan: Update config to load ConfirmEdit 2024-05-05 11:02:07 +03:00
db_patches Drop af_user(_text) and afh_user(_text) fields 2024-06-10 18:48:21 +02:00
i18n Localisation updates from https://translatewiki.net. 2024-11-11 08:21:20 +01:00
includes Create protected variable access logs POSTSEND 2024-11-11 14:33:47 +00:00
maintenance Use namespaced classes 2024-10-19 21:55:40 +02:00
modules Clean up an unused OOUI infuse 2024-10-28 05:54:31 +00:00
tests Create protected variable access logs POSTSEND 2024-11-11 14:33:47 +00:00
.eslintignore Add docs, i18n to eslintignore 2024-09-24 12:40:48 +01:00
.eslintrc.json build: Update linters 2022-03-17 22:19:08 +00:00
.gitignore Add config for Selenium and basic tests 2019-09-17 16:23:07 +00:00
.gitreview Whoops, track not trace 2016-10-24 17:01:30 -07:00
.phpcs.xml build: Updating mediawiki/mediawiki-codesniffer to 45.0.0 2024-11-01 01:02:33 +00:00
.stylelintrc.json build: Update linters 2023-11-08 14:05:03 +00:00
AbuseFilter.alias.php Add new special page aliases for Chinese variants 2024-06-30 15:55:02 +08:00
CODE_OF_CONDUCT.md build: Updating mediawiki/phan-taint-check-plugin to 1.4.0 2018-09-01 05:29:54 +00:00
composer.json build: Updating mediawiki/mediawiki-codesniffer to 45.0.0 2024-11-01 01:02:33 +00:00
COPYING Add COPYING 2014-01-22 21:21:10 +00:00
extension.json Give the sysop group protected vars access rights 2024-10-17 03:00:32 -07:00
Gruntfile.js build: Run stylelint for less file 2023-11-28 20:06:41 +01:00
package-lock.json build: Updating micromatch to 4.0.8 2024-08-24 14:37:14 +00:00
package.json build: Updating npm dependencies 2024-06-16 16:32:36 +00:00
quibble.yaml build: Add quibble.yaml and enable early warning bot feedback 2024-05-10 14:25:14 +02:00