Page MenuHomePhabricator

Data error in ApiVisualEditor
Closed, ResolvedPublic

Description

Seen in production:

8 Warning: data error in /srv/mediawiki/php-1.25wmf23/extensions/VisualEditor/ApiVisualEditor.php on line 317

Event Timeline

demon created this task.Apr 3 2015, 4:41 PM
demon raised the priority of this task from to Normal.
demon updated the task description. (Show Details)
demon added a subscriber: demon.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 3 2015, 4:41 PM
Krenair added a subscriber: Krenair.Apr 3 2015, 5:13 PM

Bad data going into the html param?

The warning is from gzinflate apparently, but that data is supposed to come from EasyDeflate.deflate on the client. I guess someone might just be sending in nonsense.

So if I request this:

api.php?action=visualeditor&html=rawdeflate,testing&page=Main_Page&paction=serializeforcache

We get these errors in hhvm.log:

Apr  3 17:20:15 mw1114:  #012Warning: data error in /srv/mediawiki/php-1.25wmf23/extensions/VisualEditor/ApiVisualEditor.php on line 317
Apr  3 17:20:15 mw1114:  #012Notice: Undefined index: oldid in /srv/mediawiki/php-1.25wmf23/extensions/VisualEditor/ApiVisualEditor.php on line 562

(Adding an oldid parameter makes the second error not appear.)

Change 201743 had a related patch set uploaded (by Alex Monk):
Check whether html parameter is valid rather than allow warnings to be raised if it is not

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

Change 201743 merged by jenkins-bot:
Check whether html parameter is valid rather than allow warnings to be raised if it is not

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

Change 201772 had a related patch set uploaded (by Alex Monk):
Avoid undefined index warning for oldid if it's not set in serializeforcache

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

Change 201772 merged by jenkins-bot:
Avoid undefined index warning for oldid if it's not set in serializeforcache

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

Krenair closed this task as Resolved.Apr 4 2015, 11:25 PM
Krenair claimed this task.
mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:12 PM
Restricted Application added a project: User-Ryasmeen. · View Herald TranscriptAug 28 2019, 11:12 PM