Page MenuHomePhabricator

Bad data in campaign config can break templates
Closed, ResolvedPublic

Description

There has been one report so far of bad campaign data causing a template breakage on photo upload:

https://commons.wikimedia.org/w/index.php?title=File:Gimnazjum,_ob-_III_LO_2012-07-31_14-27-29.jpg&oldid=76984495

This appears due to a syntax problem in one of the data fields in the campaign data for Poland. The 'idField' contains some lovely wikitext that is not complete:
"idField": "{{Zabytek|2=$1|",

Which results in the broken template:

{{int:filedesc}}

{{Information

description={{pl1=Gimnazjum, ob. III LO}}

{{Zabytek|2=A 014|
{{Uploaded with WLM Mobile

app-version=1.2
platform=Android
user-agent=Android 4.0.4; pl-pl; GT-I9100 Build/IMM76D

}}

date=2012-08-31
source={{own}}
author=[[User:PMG|PMG]]
permission=
other_versions=
other_fields=

}}

I've fixed the data for the campaign, however we should also guard ourselves against bad data since we have no control over the input, and the input for most campaign data fields is free-form input and can contain pure text, or wiki markup, etc.


Version: unspecified
Severity: normal

Details

Reference
bz39847

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 12:53 AM
bzimport set Reference to bz39847.
bzimport added a subscriber: Unknown Object (MLST).
  • This bug has been marked as a duplicate of bug 39872 ***
  • Bug 39879 has been marked as a duplicate of this bug. ***