Commit graph

7550 commits

Author SHA1 Message Date
Bartosz Dziewoński 0a83eb9b5d FilterValidatorTest: Use MediaWiki core status assertions
Depends-On: Ie4b3ebc03abb0e352e82394ced6ab9e733c83fb4
Depends-On: I8718cf7890f05c09a6e5712ee3dc4d171a6637cf
Change-Id: I6cb0cee65646b2b108319df6a9f862cbdd881691
2024-06-25 20:44:51 +00:00
Translation updater bot 4dc11add8e
Localisation updates from https://translatewiki.net.
Change-Id: I32243a432bee13c317daae57e8b4e6d3ffeabeb9
2024-06-24 09:24:32 +02:00
Translation updater bot d83e1316dc
Localisation updates from https://translatewiki.net.
Change-Id: I0485bd7561b1d6468f35186743c8374ad6ad11a4
2024-06-21 09:40:51 +02:00
jenkins-bot 788571fb3a Merge "LoadExtensionSchemaUpdates: Remove unused path from 'runMaintenance' action" 2024-06-20 16:29:16 +00:00
jenkins-bot 8dd15bac76 Merge "Fix variable descriptions showing raw "($1)"" 2024-06-20 15:46:12 +00:00
jenkins-bot 72ab79dcd1 Merge "Remove AbuseFilterActorMigration" 2024-06-20 15:44:49 +00:00
Bartosz Dziewoński 29e8b6e13b LoadExtensionSchemaUpdates: Remove unused path from 'runMaintenance' action
MediaWiki has never used this path for running the maintenance
scripts, only the class name provided in the other parameter.
Providing the parameter is no longer needed in MediaWiki 1.43.

Bug: T367918
Change-Id: Ie098fa124039cc1122135cae72c74579d43dc04f
2024-06-19 19:58:17 +02:00
Translation updater bot 67aea2aa7e
Localisation updates from https://translatewiki.net.
Change-Id: Ia610542c2f8482bb176dbf6a00bfcfd722a0ffb7
2024-06-18 09:26:37 +02:00
jenkins-bot c1961b9d99 Merge "Use expression builder in AbuseFilterView::buildTestConditions" 2024-06-17 19:55:35 +00:00
jenkins-bot bb026443dd Merge "Drop af_user(_text) and afh_user(_text) fields" 2024-06-17 12:25:54 +00:00
Translation updater bot d4d04d1138
Localisation updates from https://translatewiki.net.
Change-Id: If946cd2ec431718b2812f2dabe2584bf751bf28d
2024-06-17 09:29:07 +02:00
Matěj Suchánek 1373bf8d11 Fix variable descriptions showing raw "($1)"
In 1904cf8, "($1)" were appended to the messages, but
the argument was not substituted in the var dump table,
showing literal ($1). Substitute <code>var_name</code>
to keep previous experience.

However, many translations have not been updated yet.
If the variable name was indicated by the message
argument, it would often be missing. Therefore, make
sure the placeholder is always present.

Bug: T360909
Change-Id: I1e4a97210c891c375b0f14c0891c2d25a0a389d1
2024-06-16 22:11:08 +02:00
libraryupgrader cb20be6b58 build: Updating npm dependencies
* eslint-config-wikimedia: 0.28.1 → 0.28.2
* grunt-stylelint: 0.20.0 → 0.20.1

Change-Id: I8329c44daf60817de62d3a64714df50cd4600341
2024-06-16 16:32:36 +00:00
Matěj Suchánek cb08d684d5 Remove AbuseFilterActorMigration
Bug: T188180
Change-Id: Idcacc9f63075b621bbc858a461dc6fb7ab7a9a39
Depends-On: I7dd5fc0f9d80636b0cdf3d995fe22c1f43a5b68d
Depends-On: Ibdb2b4096f26fc6752456a05f8d70a9a6d9609ad
2024-06-15 09:42:27 +02:00
Translation updater bot 16aa6eaaff
Localisation updates from https://translatewiki.net.
Change-Id: I440eacb6bf5151efa48ae2c8c641aca52ca5f634
2024-06-14 09:47:57 +02:00
jenkins-bot 92e1335cc8 Merge "Use ObjectCacheFactory" 2024-06-13 13:45:45 +00:00
jenkins-bot 4e919e4338 Merge "Add protected variable view permission checks" 2024-06-13 13:18:14 +00:00
Wandji69 5336a5ea41 Use ObjectCacheFactory
Bug: T363770
Change-Id: I465e251d4bbccd4ce98eb34ff05d749d3de84c43
2024-06-13 12:34:16 +01:00
STran abe6f1f4ee Add protected variable view permission checks
Some features restrict access when filters are private. These features
should treat protected filters similarly.

If the user doesn't have view rights for protected filters:
  - Disallow viewing of logs generated by protected filters
  - Disallow querying of matches against protected filters

Bug: T363906
Change-Id: Id84bd4ca7c8e0419fccc3ad83afff35067c9bf70
2024-06-13 03:15:04 -07:00
Translation updater bot 6e72123efe
Localisation updates from https://translatewiki.net.
Change-Id: Idabdd0812e9f5ddc9335c6aeac4397163674a6d0
2024-06-13 09:27:20 +02:00
Umherirrender bd52ef6263 Use expression builder in AbuseFilterView::buildTestConditions
Bug: T350968
Change-Id: I2b91a7e5b18ac9bb4f79018014ed60e2f0830487
2024-06-12 20:43:46 +00:00
jenkins-bot f5fa2511ef Merge "Use namespaced classes" 2024-06-12 20:40:36 +00:00
jenkins-bot 683634482e Merge "maintenance: Remove reference to cleanupUsersWithNoId.php" 2024-06-12 20:15:52 +00:00
Umherirrender c3af3157b4 Use namespaced classes
Changes to the use statements done automatically via script
Addition of missing use statement done manually

Change-Id: I48fcc02c61d423c9c5111ae545634fdc5c5cc710
2024-06-12 20:01:35 +02:00
Matěj Suchánek e1858da1fa maintenance: Remove reference to cleanupUsersWithNoId.php
It isn't available anymore, and it wouldn't even make
any change.

Bug: T367129
Change-Id: Ifd926856264aef8f2648cdb983c7710d9f23aa77
2024-06-12 18:49:10 +02:00
jenkins-bot f6851374ce Merge "Force full evaluation of filter in FilterEvaluator->getUsedVars()" 2024-06-12 10:03:02 +00:00
Translation updater bot f68337c29d
Localisation updates from https://translatewiki.net.
Change-Id: Ie76af12f2a5405ba1b4f17fa66e17004e44aff69
2024-06-12 09:21:12 +02:00
libraryupgrader 64c81b2150 build: Updating npm dependencies
* eslint-config-wikimedia: 0.28.0 → 0.28.1
* stylelint-config-wikimedia: 0.17.1 → 0.17.2

Change-Id: I58c541bfb55d8a6838b3a3201ca636c28bfd335c
2024-06-11 12:13:35 +00:00
STran f5d7b68908 Force full evaluation of filter in FilterEvaluator->getUsedVars()
In some cases, evaluation short-circuits when getting a list of
used variables resulting in an incomplete array of variables. This
subsequently causes issues when using those arrays for validation
checks (eg. if protected variables are used).

- Force full evaluation by setting `mAllowShort` to false

Bug: T364485
Change-Id: Idf2112d9ebf63846cde3ce9b8a8ade0ed909505d
2024-06-11 02:43:47 -07:00
Translation updater bot 25e1b8f8eb Localisation updates from https://translatewiki.net.
Change-Id: I935f1853cb383a5cb4d88687a4e81b73fea2b403
2024-06-11 09:53:08 +02:00
Matěj Suchánek 469d643530 Drop af_user(_text) and afh_user(_text) fields
They have been migrated to their respective _actor counterparts.

Bug: T188180
Change-Id: I76ab3a4eeaf93bf009ba3a5d4a0315443b6839ef
2024-06-10 18:48:21 +02:00
jenkins-bot a5afeff49c Merge "Drop $wgAbuseFilterActorTableSchemaMigrationStage" 2024-06-10 13:27:07 +00:00
Matěj Suchánek c2da0d4857 Drop $wgAbuseFilterActorTableSchemaMigrationStage
First patch in a series of dropping the old columns.
Wikis now need to run the maintenance script (e.g., via
update.php) prior to serving this commit.

Wikimedia wikis are already on SCHEMA_COMPAT_NEW stage.

Bug: T188180
Change-Id: I86ec2b816eed17b62bf02bfd085570f132011b3e
2024-06-10 12:08:30 +00:00
Translation updater bot d4d679a62e Localisation updates from https://translatewiki.net.
Change-Id: I3890ae83c9ee56fede22ac334628f125759f74e8
2024-06-10 09:54:05 +02:00
jenkins-bot 056bcafe08 Merge "Use expression builder to build where conditions" 2024-06-09 03:45:36 +00:00
jenkins-bot 7bbf55935c Merge "Hide the checkbox for protecting a filter from users without the right" 2024-06-07 10:39:43 +00:00
Translation updater bot 124bf78d4c Localisation updates from https://translatewiki.net.
Change-Id: Ic978fa445c0d8248347ecdbc7e24314caf89b05b
2024-06-07 09:43:02 +02:00
jenkins-bot 4b9c2e612c Merge "Clarify protected status in filter checkboxes" 2024-06-06 18:00:27 +00:00
Thalia 6428ff9232 Hide the checkbox for protecting a filter from users without the right
Any filter using protected variables must be marked as protected via
the a checkbox on the filter edit form. This checkbox should not be
visible to users without the right to use protected variables.

Bug: T364485
Change-Id: If2c4b8f50f447e951d820798f181839d10501aa3
2024-06-06 17:49:46 +01:00
jenkins-bot f432f7c4e6 Merge "Fix permission error shown on history page for protected filter" 2024-06-06 15:05:24 +00:00
STran 1c96981117 Clarify protected status in filter checkboxes
The UI/UX for acknowledging a filter will be protected/is protected
could be clearer. The checkbox implemented currently doesn't make
it clear that the acknowledgement is mandatory and filters that are
already protected allow for the checkbox to be unchecked even though
that doesn't reflect that the filter cannot be unprotected.

- Update copy for the protected filter acknowledgement to make it clear
  that it's a mandatory acknowledgement, not an optional one
- Update copy for the error that shows when a filter that should be
  protected doesn't have the acknowledgement checked
- When a filter is already protected, disable the acknowledgement
  checkbox to indicate this is not mutable

Bug: T364485
Change-Id: I667fcca4511dff1ac3ca69930c5b5e5eb5001787
2024-06-06 00:23:39 -07:00
jenkins-bot 415135a156 Merge "Stop trying to update new storage method ES address pointers" 2024-06-06 00:03:55 +00:00
libraryupgrader 3583cad1a3 build: Updating stylelint-config-wikimedia to 0.17.1
Change-Id: I0e2ccd826ced9008328a53c197076bad0067db69
2024-06-05 18:50:22 +00:00
Amir Sarabadani 4fb92a37b8 Stop trying to update new storage method ES address pointers
We are trying to get rid of text table. See T183490 and explicitly see T362566.

Bug: T366705
Change-Id: Id133ff94e9518c7819c2e2fb8e01ee2a115c24d7
2024-06-05 19:20:25 +02:00
jenkins-bot 64443f9905 Merge "Add error message for unprivileged access of filter history" 2024-06-05 15:19:31 +00:00
Thalia 8f39ef3b8a Fix permission error shown on history page for protected filter
When a user without the right to see protected filters visits
Special:AbuseFilter/history/<ID>, show the permission error
message for protected filters.

Before this commit, the error message for hidden filters is
used instead, even if the filter is not hidden.

Bug: T364465
Change-Id: If2573fe256a7e29e8184feaf2f0622659706fd56
2024-06-05 15:53:04 +01:00
jenkins-bot 3897096fd7 Merge "Implement 'protected' filter acknowledgement checkbox" 2024-06-05 13:42:33 +00:00
STran 5da20292ea Add error message for unprivileged access of filter history
Attempting to access a diff in the history of a protected filter when
the user doesn't have the right to view protected variables results
in the 'abusefilter-history-error-protected' error and requires copy.

- Add copy for the user-facing 'abusefilter-history-error-protected'
  error

Bug: T364465
Change-Id: I0e9afae90c43bd3f792f1330ea865c0d56a023d1
2024-06-05 06:22:10 -07:00
STran 69a28f7f03 Implement 'protected' filter acknowledgement checkbox
- Add a basic checkbox on the filter edit page that must be checked if a
  filter uses a protected variable to ensure that the user is aware that
  their filter will also become protected

Bug: T364485
Change-Id: I7c7652f7d1a81223229b839ff7eee5da4af74c8a
2024-06-05 05:43:25 -07:00
Translation updater bot e126601788 Localisation updates from https://translatewiki.net.
Change-Id: I2ea878200aef92946e81300e76a071d5054c2a97
2024-06-05 09:21:47 +02:00