mediawiki-extensions-AbuseF.../tests/phpunit
STran 30227231f6 Disallow protected variable access on AbuseFilterViewTestBatch
A filter using a protected variable can be loaded via filter id
using testing tools even though the user might not have the right
to view protected variables. This can potentially leak PII and as
such, testing tools should check for the right before allowing
protected filters to be seen.

- Unload a filter asap if it uses protected variables and the
  requestor doesn't have viewing rights. This:
    + disallows loading of existing protected filters on page load
    + disallows testing against rules that use protected variables
    + disallows subsequent requests for protected filters (via API)

There is a known bug (see T369620) where no user feedback is
provided if an API request for a filter returns no result (typically
when no filter matches the requested id). This commit adds another
pathway to that bug (the filter exists but is protected and not
returned by the API) but does not update this UI/UX.

Bug: T364834
Change-Id: I6a572790edd743596d70c9c4a2ee52b4561e25f3
2024-07-10 05:31:03 -07:00
..
integration Disallow protected variable access on AbuseFilterViewTestBatch 2024-07-10 05:31:03 -07:00
unit Merge "Simplify FilterEvaluator::getUsedVars using ::checkSyntax" 2024-07-08 12:42:18 +00:00
AbuseFilterConsequencesTest.php Merge "Drop af_user(_text) and afh_user(_text) fields" 2024-06-17 12:25:54 +00:00
AbuseFilterCreateAccountTestTrait.php Use namespaced classes 2023-12-10 23:03:12 +01:00
AbuseFilterFilterUserTest.php Use namespaced classes 2024-06-12 20:01:35 +02:00
AbuseFilterRowsAndFiltersTestTrait.php Convert af_hidden into a bitmask 2024-05-28 00:59:08 -07:00
AbuseFilterUploadTestTrait.php Use namespaced classes 2024-06-12 20:01:35 +02:00
ConsequenceGetMessageTestTrait.php Use ActionSpecifier to load the IP address 2022-12-17 22:52:24 +01:00
DegroupTest.php tests: Widen @covers tags in phpunit tests 2024-04-17 01:44:40 +01:00
LazyVariableComputerDBTest.php tests: Widen @covers tags in phpunit tests 2024-04-17 01:44:40 +01:00
RCVariableGeneratorTest.php RCVariableGeneratorTest: Handle anonymous user test with temp accounts enabled 2024-05-23 09:41:05 +02:00
SchemaChangesHandlerTest.php Use namespaced classes 2024-06-12 20:01:35 +02:00