wiki.techinc.nl/includes/edit
Máté Szabó b99dcc23bc parser: Gracefully handle invalid ParsoidRenderID keys
Why:

- ParsoidRenderID::newFromKey() validates incoming keys and throws an
  InvalidArgumentException if a required key component was missing.
- It does so by eagerly destructuring the return value of explode(),
  which causes a PHP Notice for invalid inputs as the expected offsets
  won't exist then.

What:

- Check the count of key parts before destructuring.
- Add unit tests.

Bug: T385567
Change-Id: I1d936ae038f85ffa2e5d1d3d8a75fdc75e4c8ef8
(cherry picked from commit eec130925c081c2da1c475f9a9ce719e6838ca51)
2025-02-04 14:54:31 +00:00
..
ParsoidOutputStash.php
ParsoidRenderID.php parser: Gracefully handle invalid ParsoidRenderID keys 2025-02-04 14:54:31 +00:00
PreparedEdit.php Namespace all remaining classes in includes/parser 2024-10-15 23:54:32 +01:00
SelserContext.php Move remaining four classes in includes/content into Content namespace 2024-08-10 10:40:53 +02:00
SimpleParsoidOutputStash.php Add namespace to the root classes of ObjectCache 2024-07-10 00:14:54 +03:30