Page MenuHomePhabricator

Remove pagebundle support from public transform endpoint
Closed, ResolvedPublic

Description

The concept of pagebundles should not be part of public stable APIs. For this reason, the transform endpoint exposed by MW core should not support them.

However, the legacy transform endpoint exposed by the parsoid extension needs to continue to support pagebundle. Since both endpoints are backed by the same handler class, the set of valid transformations needs to be configurable, rather than being defined as a constant in ParsoidFormatHelper::VALID_TRANSFORM.

If it turns out that we need pagbundle based REST endpoints internally, separate endpoints should be exposed at paths that is inaccessible for the public. These endpoints could be backed by the same Handler class that handles HTML input and output, since a PageBundle is just HTML with extra data wrapped in JSON.

Event Timeline

daniel triaged this task as High priority.Jun 29 2022, 10:28 AM

Change 809591 had a related patch set uploaded (by D3r1ck01; author: Derick Alangi):

[mediawiki/core@master] Rest: Make transformation endpoints configurable

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

Change 809591 merged by jenkins-bot:

[mediawiki/core@master] Rest: Make transformation endpoints configurable

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