Page MenuHomePhabricator

GlobalBlock API can block with past expiration date
Closed, ResolvedPublic

Description

GlobalBlock API is able to block with expiration dates which are in the past, see this and this block. This was achieved via Python (P10835), running the command .\proxy.py -"3 years"

Event Timeline

Once T248508 is complete, we can make use of the new param type in the Global Block API and that will make it impossible to use expiries in the past.

Change 743211 had a related patch set uploaded (by Tks4Fish; author: Tks4Fish):

[mediawiki/extensions/GlobalBlocking@master] API: set 'expiry' PARAM_TYPE to 'expiry' instead of 'string'

https://gerrit.wikimedia.org/r/743211

Change 743211 merged by jenkins-bot:

[mediawiki/extensions/GlobalBlocking@master] API: set 'expiry' PARAM_TYPE to 'expiry' instead of 'string'

https://gerrit.wikimedia.org/r/743211

I've tested this in production and the API no longer accepts expiries in the past.