Page MenuHomePhabricator

Z0 should never be stored as a ZID in a ZObject
Closed, ResolvedPublic

Event Timeline

DVrandecic triaged this task as Medium priority.Mar 10 2021, 5:40 PM
DVrandecic created this task.

@DVrandecic what do you mean, and why have you created this task?

So I can confirm that edits through action=edit or the API both result in the wikilambda-invalidzobjecttitle error, as expected.

When we move this code into the DAO service we might use a secondary hook like EditFilter to sit alongside MultiContentSave, but that seems like it shouldn't be needed?

Whilst I'm here, though, let's add it to the permission ban list via getUserPermissionsErrors.

Change 670582 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/extensions/WikiLambda@master] Add our ZObject title requirements using the getUserPermissionsErrors hook

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

Change 670582 merged by jenkins-bot:
[mediawiki/extensions/WikiLambda@master] Add our ZObject title requirements using the getUserPermissionsErrors hook

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

Maybe more fundamentally the regex matches should all be adjusted so it's looking for Z[1-9]\d* rather than Z\d+ as a valid Z id?

Maybe more fundamentally the regex matches should all be adjusted so it's looking for Z[1-9]\d* rather than Z\d+ as a valid Z id?

All the PHP-side regexs do this already. I think we're a little looser on the Vue side, and we actively use Z0 as a placeholder for new ZObject creation there…

OK, I /think/ this is now done. Fingers crossed.