wiki.techinc.nl/tests/phpunit/integration/includes/Rest/Handler
Máté Szabó c4e9f987f1 rest: Return a 400 for invalid render IDs
Why:

- The REST API takes an optional renderid param when converting HTML
  back to source wikitext, which is user-provided and may be invalid.
- Invalid render IDs cause an InvalidArgumentException to be thrown that
  causes a 500 response.

What:

- Introduce a new error message for invalid render IDs in the REST API.
- Return a 400 with this new error message for HTML reverse-parses with
  an invalid render ID.

Bug: T385568
Change-Id: I062419fe8952329a39781a49cdca2e94c3996447
(cherry picked from commit cd1d42a5066e4bcb9b9d4ed9b4f7714fd428fea3)
2025-02-04 14:54:50 +00:00
..
data REST: validate JSON in tests 2024-09-20 15:42:32 +00:00
Helper rest: Return a 400 for invalid render IDs 2025-02-04 14:54:50 +00:00
CreationHandlerTest.php Merge "Adding token validation to the edit handler" 2024-10-17 14:51:30 +00:00
DiscoveryHandlerTest.php Make Message and MessageValue compatible 2024-10-19 15:00:07 +02:00
HTMLHandlerTestTrait.php Use explicit nullable type on parameter arguments 2024-10-16 20:58:33 +02:00
LanguageLinksHandlerTest.php Use MainConfigNames constants in tests where possible 2024-07-10 10:11:22 +00:00
MediaFileHandlerTest.php tests: Add more use statements in namespaced classes 2024-02-18 21:31:02 +00:00
MediaLinksHandlerTest.php tests: Add more use statements in namespaced classes 2024-02-18 21:31:02 +00:00
ModuleSpecHandlerTest.php Make Message and MessageValue compatible 2024-10-19 15:00:07 +02:00
OpenSearchDescriptionHandlerTest.php REST: introduce OpenSearchDescriptionHandler 2024-05-18 17:29:07 +00:00
PageHTMLHandlerTest.php [HtmlOutputRendererHelper] Remove use of ParsoidOutputAccess::parseUncacheable 2024-07-19 03:09:32 -04:00
PageRedirectHandlerTest.php Add namespace to the root classes of ObjectCache 2024-07-10 00:14:54 +03:30
PageSourceHandlerTest.php REST: Add items wrapper for restbase compat to some response bodies 2024-10-16 12:58:10 -05:00
ParsoidHandlerTest.php Use statslib for metrics emitted by HtmlInputTransformHelper, HtmlToContentTransform 2024-10-17 21:28:04 +02:00
ParsoidOutputAccessTest.php tests: Use namespaced classes 2024-10-21 18:53:02 +02:00
RedirectHandlerTest.php REST: allow redirects to be defined without specifying a handler 2024-04-17 18:27:31 +02:00
RevisionHTMLHandlerTest.php Use statslib for metrics emitted by HtmlOutputRendererHelper 2024-10-04 14:52:30 -04:00
RevisionSourceHandlerTest.php Use explicit nullable type on parameter arguments 2024-10-16 20:58:33 +02:00
SpecTestFlatRoutes.json REST: Make module definition files more like OpenAPI specs 2024-06-24 16:42:59 +02:00
SpecTestModule.json REST: include version in generated OpenAPI spec 2024-08-19 20:47:40 +02:00
SpecTestRoutes.json REST: Introduce discovery endpoint 2024-09-20 17:02:59 +00:00
TransformHandlerTest.php Use MainConfigNames constants in tests where possible 2024-07-10 10:11:22 +00:00
UpdateHandlerTest.php Merge "Adding token validation to the edit handler" 2024-10-17 14:51:30 +00:00