diff options
| author | Christian Stocker <chregu@php.net> | 2011-07-11 11:16:22 +0000 |
|---|---|---|
| committer | Christian Stocker <chregu@php.net> | 2011-07-11 11:16:22 +0000 |
| commit | 0511fa337eac340af49432c56e2c1d19f1d680d9 (patch) | |
| tree | 4fc1aae888cd6d144145ce34052cb0fd92102958 /ext/xsl/php_xsl.h | |
| parent | 0f3e70fe014dd4d40773f01c35b4b6451c76e300 (diff) | |
| download | php-git-0511fa337eac340af49432c56e2c1d19f1d680d9.tar.gz | |
Added XsltProcessor::setSecurityPrefs($options) and getSecurityPrefs()
to define forbidden operations within XSLT stylesheets, default is not to
enable any write operations from XSLT anymore. Bug #54446
Diffstat (limited to 'ext/xsl/php_xsl.h')
| -rw-r--r-- | ext/xsl/php_xsl.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/xsl/php_xsl.h b/ext/xsl/php_xsl.h index 5d1ffa5c3f..8782077413 100644 --- a/ext/xsl/php_xsl.h +++ b/ext/xsl/php_xsl.h @@ -32,6 +32,7 @@ extern zend_module_entry xsl_module_entry; #include <libxslt/xsltInternals.h> #include <libxslt/xsltutils.h> #include <libxslt/transform.h> +#include <libxslt/security.h> #if HAVE_XSL_EXSLT #include <libexslt/exslt.h> #include <libexslt/exsltconfig.h> @@ -43,6 +44,13 @@ extern zend_module_entry xsl_module_entry; #include <libxslt/extensions.h> #include <libxml/xpathInternals.h> +#define XSL_SECPREF_NONE 0 +#define XSL_SECPREF_READ_FILE 2 +#define XSL_SECPREF_WRITE_FILE 4 +#define XSL_SECPREF_CREATE_DIRECTORY 8 +#define XSL_SECPREF_READ_NETWORK 16 +#define XSL_SECPREF_WRITE_NETWORK 32 + typedef struct _xsl_object { zend_object std; void *ptr; @@ -55,6 +63,7 @@ typedef struct _xsl_object { HashTable *node_list; php_libxml_node_object *doc; char *profiling; + long securityPrefs; } xsl_object; void php_xsl_set_object(zval *wrapper, void *obj TSRMLS_DC); |
