From 71ff7bc597b1c57f75228ad725ec98a419473fe2 Mon Sep 17 00:00:00 2001 From: Stefan Walk Date: Fri, 30 Jan 2004 18:09:45 +0000 Subject: [PATCH] Add security warning git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@150175 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/array/functions/extract.xml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/reference/array/functions/extract.xml b/reference/array/functions/extract.xml index bb9782ec4d..078ba19d61 100644 --- a/reference/array/functions/extract.xml +++ b/reference/array/functions/extract.xml @@ -1,5 +1,5 @@ - + @@ -147,6 +147,17 @@ extract returns the number of variables successfully imported into the symbol table. + + + Do not use extract on untrusted data, like user-input ($_GET, ...). + If you do it, for example if you want to run old code that relies on + ""register_globals + temporarily, make sure you use one of the non-overwriting + extract_types like EXTR_SKIP, and be aware that + you should now extract $_SERVER, $_SESSION, $_COOKIE, $_POST and $_GET + in that order. + + A possible use for extract is to import into the symbol table variables contained in an associative array returned by