As part of the changes implemented in T387331: Provide a mechanism for other extensions to modify protected variables access requirements, access to protected variables is only logged if an actual value is present:
if ( count( $protectedVariableValuesShown ) ) {
$logger = $this->abuseLoggerFactory->getProtectedVarsAccessLogger();This replaces code that used to infer whether or not a log view should be logged, as technical limitations at the time caused a use case which unnecessarily logged views of public logs. However, we should still log if the logs of a protected filter were viewed, similar to how CheckUser logs all uses, even if no results were found. This can happen when a filter that was previously using protected variables no longer uses them, as it will still be considered protected into perpetuity.
Acceptance Criteria:
- Views of logs of protected filter hits are logged, even if no protected variable values are exposed.