Commit: 6549aeb5f730da61226d2f302c61649f263ba86d Author: Sherif Ramadan <[email protected]> Fri, 21 Dec 2012 22:36:24 -0500 Parents: f286ac42270199cbb331bf0154d2abed3c79a8e4 Branches: master
Link: http://git.php.net/?p=web/master.git;a=commitdiff;h=6549aeb5f730da61226d2f302c61649f263ba86d Log: Account for array values in post when reverting to unsafe_raw. Changed paths: M manage/user-notes.php Diff: diff --git a/manage/user-notes.php b/manage/user-notes.php index f0a1e08..ff346e8 100644 --- a/manage/user-notes.php +++ b/manage/user-notes.php @@ -15,7 +15,13 @@ include '../include/note-reasons.inc'; - Please use hscr() as opposed to clean() and real_clean() as opposed to escape(). */ foreach($_GET as $key => $val) $_GET[$key] = filter_input(INPUT_GET,$key,FILTER_UNSAFE_RAW); -foreach($_POST as $key => $val) $_POST[$key] = filter_input(INPUT_POST,$key,FILTER_UNSAFE_RAW); +foreach($_POST as $key => $val) { + if (!is_array($val)) { + $_POST[$key] = filter_input(INPUT_POST,$key,FILTER_UNSAFE_RAW); + } else { + foreach ($val as $k=>$v) { var_dump($val[$k]); $_POST[$key][$k] = filter_input(INPUT_POST,$val[$k],FILTER_UNSAFE_RAW); } + } +} foreach($_COOKIE as $key => $val) $_COOKIE[$key] = filter_input(INPUT_COOKIE,$key,FILTER_UNSAFE_RAW); foreach($_POST as $key => $val) $_REQUEST[$key] = filter_input(INPUT_POST,$key,FILTER_UNSAFE_RAW); foreach($_GET as $key => $val) $_REQUEST[$key] = filter_input(INPUT_GET,$key,FILTER_UNSAFE_RAW); -- PHP Webmaster List Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
