Page MenuHomePhabricator

Crasher in production
Closed, ResolvedPublic

Description

Some unhandled tplArgs handling case causes Parsoid to crash on this page.

http://localhost:8000/arwiki/%D9%85%D8%B3%D8%AA%D8%AE%D8%AF%D9%85%3A%D8%AE%D8%A7%D9%84%D8%AF%2F%D8%AA%D8%B5%D9%85%D9%8A%D9%85_%D8%A7%D9%84%D8%
B5%D9%81%D8%AD%D8%A9_%D8%A7%D9%84%D8%B1%D8%A6%D9%8A%D8%B3%D9%8A%D8%A9?oldid=9455774


Version: unspecified
Severity: normal

Details

Reference
bz61298

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:06 AM
bzimport added a project: Parsoid.
bzimport set Reference to bz61298.

test case here is:

echo "[{{fullurl:{{{link}}}|action=edit}} editar]" | node parse --prefix arwiki

fixed by putting back the token.clone() in ext.core.Sanitizer.js ~L735 but I'm still not quite sure why that is ...

Change 113482 had a related patch set uploaded by Arlolra:
Fix crasher

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

We should still investigate why the clone is necessary, and ideally remove it again without ill effects.

There's a comment in the patch about what's going on.

Templates contained in templates get their attributes stripped when passing through the sanitizer, affecting the original token in the main pipeline.

Just to clarify, that specific problem was on Marc's "parse-template-args-to-DOM" patch. But, I think something equivalent is happening on master as well -- i.e. token sharing between main and sub-pipelines (which is not saying much that is not obvious from the fact that we are cloning :-)). That is what we should investigate.

In comment 2 above I produced a test case from the crasher page that tracked the problem down to template in template being sanitized.

I should read the full comment thread before commenting then. :-)

Change 117211 had a related patch set uploaded by GWicke:
Bug 61298: Avoid need for cloning when using PHP preprocessor

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

Change 117211 merged by jenkins-bot:
Bug 61298: Avoid need for cloning when using PHP preprocessor

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