XSLTProcessor max depth
| From: | Niels Dossche | Date: | Sat, 30 Sep 2023 15:18:53 +0000 |
| Subject: | XSLTProcessor max depth | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-121195@lists.php.net to get a copy of this message | ||
Hi internals
I'm looking to address https://bugs.php.net/bug.php?id=71571.
TL;DR: XSL has a maximum recursion depth, and it may even depend on the distro/OS config.
For complex inputs you may reach this limit, but PHP offers no way to change that limit.
As we already have methods in XSLTProcessor to configure certain things (e.g. setProfiling,
setSecurityPrefs), it may be an idea to add
setMaxDepth(int $depth) or something alike.
Unfortunately, XSLTProcessor is non-final, so if a user class extends this class and coincidentally
already has a method with the same name but incompatible signature, then they would get a compile
error.
What do you think?
Kind regards
Niels