Page MenuHomePhabricator

Special:SetAliases (or SpecialModifyTerm) should properly validate / normalize label/alias input
Open, NormalPublic

Description

Screenshop of https://www.wikidata.org/wiki/Q15709419?uselang=de

I set with https://www.wikidata.org/wiki/Special:SetAliases to the item https://www.wikidata.org/wiki/Q15709419 for the language de the alias " " (U+202F NARROW NO-BREAK SPACE). The interface of the item is now blocked in this language [1]. See screenshot.

[1] https://www.wikidata.org/wiki/Q15709419?uselang=de


Version: master
Severity: normal
Whiteboard: u=dev c=backend p=0
URL: https://www.wikidata.org/wiki/Q3058198?uselang=de

Attached:

Details

Reference
bz60828

Event Timeline

bzimport raised the priority of this task from to Normal.
bzimport set Reference to bz60828.
bzimport added a subscriber: Unknown Object (MLST).
Fomafix created this task.Feb 4 2014, 2:15 PM

The item Q15709419 was merged to Q3058198. I set with
https://www.wikidata.org/wiki/Special:SetAliases/Q3058198/de the alias " " (U+202F NARROW NO-BREAK SPACE) again. The problem is still the same.

Not allowed characters are ok, but it should be the same characters everywhere.

Screenshot of https://www.wikidata.org/wiki/Q3058198?uselang=de

Screenshot of https://www.wikidata.org/wiki/Q3058198?uselang=de

The alias with U+202F NARROW NO-BREAK SPACE is still not editable or removable.

Attached:

hoo added a comment.Oct 17 2014, 8:07 PM

It no longer blocks the interface, but also it's not changeable... that's probably because:

22:07:27.510 $.trim( ' ' /* U+202F NARROW NO-BREAK SPACE */ ) === ''
22:07:27.516 true

hoo added a comment.Oct 17 2014, 8:10 PM

We should probably use a trim function in JS and in PHP which do exactly the same (that might mean making NARROW NO-BREAK SPACE not usable as label/ alias).

hoo added a comment.Nov 16 2014, 1:17 PM

Changing this bug, because it's only a result of invalid data... you shouldn't have been able to set that alias using the special page in the first place.

Lydia_Pintscher removed a subscriber: Unknown Object (MLST).
Lydia_Pintscher removed a subscriber: Unknown Object (MLST).
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 5 2015, 1:36 AM

Set U+202F as alias: https://www.wikidata.org/wiki/?diff=247934139, the GUI still works.

The GUI still does not allow to edit or remove this alias:

hoo closed this task as Resolved.Apr 7 2017, 8:11 AM
hoo claimed this task.

I just tried setting the mentioned space as an alias and failed with both the API and the special pages. Therefore I think this is resolved… if there's another place where you still can set these aliases (or labels/ descriptions), please re-open.

Fomafix reopened this task as Open.Apr 7 2017, 10:50 PM

The GUI still does not allow to edit or remove this alias:

hoo closed this task as Resolved.Apr 12 2017, 11:45 AM

I just removed all aliases which had the aforementioned value (U+202F). Given it's not possible to add any new values, I consider this done.

Fomafix reopened this task as Open.Apr 12 2017, 11:57 AM

I can restore the U+202F and it is not possible to remove or edit this value with the GUI.

hoo added a comment.Apr 12 2017, 11:59 AM

I can restore the U+202F and it is not possible to remove or edit this value with the GUI.

Sure, so just don't restore it. Restoring old revision is (partly) bypassing validation, that is known and expected here (yet, probably doesn't happen in the real world).