Page MenuHomePhabricator

JADE allows leading zeros in ids in Judgment titles
Closed, ResolvedPublic

Description

JADE allows creating pages like Judgment:Diff/0742 or Judgment:Revision/001 alongside of Judgment:Diff/742/Judgment:Revision/1.

Event Timeline

hoo created this task.Jan 15 2019, 1:52 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 15 2019, 1:52 PM
awight removed hoo as the assignee of this task.Jan 15 2019, 4:36 PM

Good find, thanks!

Harej added a subscriber: Harej.Jan 15 2019, 4:37 PM

Do we, as a general rule, want to prevent the creation of Jade pages that do not correspond to legal revision IDs?

Do we, as a general rule, want to prevent the creation of Jade pages that do not correspond to legal revision IDs?

For sure—there's validation in place to mostly do that, but this bug shows that we're missing a clause like:

assert str(int(x)) == x

We probably allow "12345.0" as well, at the moment.

Another goal of our validation is to guarantee that a judgment of any given entity has exactly one, predictable, URL.

Change 484514 had a related patch set uploaded (by Awight; owner: Awight):
[mediawiki/extensions/JADE@master] Validate for canonical page title

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

Change 484514 merged by jenkins-bot:
[mediawiki/extensions/JADE@master] Validate for canonical page title

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

hoo closed this task as Resolved.Jan 17 2019, 7:35 PM
hoo claimed this task.
hoo removed a project: Patch-For-Review.