mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
There are two depth limiting parameters for XSLT templates. 1) maxTemplateDepth This corresponds to the recursion depth of a template. For very complicated templates this can be hit. 2) maxTemplateVars This is the total number of live variables. When using recursive templates with lots of parameters you can hit this limit. This patch introduces two new properties to XSLTProcessor that corresponds to the above variables.
This commit is contained in:
parent
089f51319e
commit
30885f3b5f
18 changed files with 532 additions and 14 deletions
|
@ -359,6 +359,14 @@ static xmlDocPtr php_xsl_apply_stylesheet(zval *id, xsl_object *intern, xsltStyl
|
|||
ctxt->xinclude = zend_is_true(doXInclude);
|
||||
zend_string_release_ex(member, 0);
|
||||
|
||||
zval *max_template_depth = xsl_prop_max_template_depth(Z_OBJ_P(id));
|
||||
ZEND_ASSERT(Z_TYPE_P(max_template_depth) == IS_LONG);
|
||||
ctxt->maxTemplateDepth = Z_LVAL_P(max_template_depth);
|
||||
|
||||
zval *max_template_vars = xsl_prop_max_template_vars(Z_OBJ_P(id));
|
||||
ZEND_ASSERT(Z_TYPE_P(max_template_vars) == IS_LONG);
|
||||
ctxt->maxTemplateVars = Z_LVAL_P(max_template_vars);
|
||||
|
||||
secPrefsValue = intern->securityPrefs;
|
||||
|
||||
/* if securityPrefs is set to NONE, we don't have to do any checks, but otherwise... */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue