diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2003-06-12 01:47:12 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2003-06-12 01:47:12 +0000 |
commit | 6e2285dded89ad757c5687815f97ce8ebaadb7a6 (patch) | |
tree | 6ba9aad0ef1617bc884b347e1af0c7dd0760d7a2 | |
parent | fd88694a297ced5331a42903b31a433118b05d40 (diff) | |
download | php-git-6e2285dded89ad757c5687815f97ce8ebaadb7a6.tar.gz |
Added missing safe_mode/open_basedir checks.
-rw-r--r-- | ext/pspell/pspell.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/ext/pspell/pspell.c b/ext/pspell/pspell.c index e68814a37e..2f5993030c 100644 --- a/ext/pspell/pspell.c +++ b/ext/pspell/pspell.c @@ -206,6 +206,15 @@ PHP_FUNCTION(pspell_new_personal) config = new_pspell_config(); convert_to_string_ex(personal); + + if (PG(safe_mode) && (!php_checkuid(Z_STRVAL_PP(personal), NULL, CHECKUID_CHECK_FILE_AND_DIR))) { + RETURN_FALSE; + } + + if (php_check_open_basedir(Z_STRVAL_PP(personal) TSRMLS_CC)) { + RETURN_FALSE; + } + pspell_config_replace(config, "personal", Z_STRVAL_PP(personal)); pspell_config_replace(config, "save-repl", "false"); @@ -737,6 +746,15 @@ PHP_FUNCTION(pspell_config_personal) } convert_to_string_ex(personal); + + if (PG(safe_mode) && (!php_checkuid(Z_STRVAL_PP(personal), NULL, CHECKUID_CHECK_FILE_AND_DIR))) { + RETURN_FALSE; + } + + if (php_check_open_basedir(Z_STRVAL_PP(personal) TSRMLS_CC)) { + RETURN_FALSE; + } + pspell_config_replace(config, "personal", Z_STRVAL_PP(personal)); RETURN_TRUE; @@ -768,6 +786,15 @@ PHP_FUNCTION(pspell_config_repl) pspell_config_replace(config, "save-repl", "true"); convert_to_string_ex(repl); + + if (PG(safe_mode) && (!php_checkuid(Z_STRVAL_PP(repl), NULL, CHECKUID_CHECK_FILE_AND_DIR))) { + RETURN_FALSE; + } + + if (php_check_open_basedir(Z_STRVAL_PP(repl) TSRMLS_CC)) { + RETURN_FALSE; + } + pspell_config_replace(config, "repl", Z_STRVAL_PP(repl)); RETURN_TRUE; |