daniel added a comment.

I can confirm that it is possible to link to random non-existing image names, 
see for example 
https://www.wikidata.org/w/index.php?title=Q64&type=revision&diff=254077747&oldid=251454075

The situation seems to be as follows:

- The backend applies //validation// to all API input (from the UI and from 
bots). For CommonsMedia, this does //not// (and never did) check whether the 
image exists, it just checks whether the input is a syntactically valid image 
name.
- The UI provides //suggestions// while the user is typing input. It does 
however allow the user to enter something that does not match any suggestion.

I suspect that in the past, the UI applied an extra validation step on the user 
input, which got dropped when we consolidated all validation in the backend.

Possible solutions:

- Make backend validation check image existence. This would make it impossible 
to link non-existing images. It may (depending on how things are implamented) 
also make it impossibel to edit statements that link images that got deleted - 
it would not be possible to change the rank, or qualifiers, and the resulting 
error message may be confusing (the error has nothing to do with the edit the 
change the user was trying to make).
- Make the input widget in the UI allow only input that matches a suggestion. I 
suspect this was the case in the past (or an extra validation step was 
applied). This would not prevent non-existing images to referenced via the API 
directly, so bots could still create "bad" image links.


TASK DETAIL
  https://phabricator.wikimedia.org/T87263

EMAIL PREFERENCES
  https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: daniel
Cc: matej_suchanek, thiemowmde, Jonas, Nikki, Steinsplitter, Ricordisamoa, 
JanZerebecki, daniel, Aklapper, Lydia_Pintscher, Wikidata-bugs, aude



_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to