Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function fixRequestData() {
- /* unescape request data */
- /* PHP doc claims for this to already been done, but I think it has to do with server setup. */
- if($_SERVER['REQUEST_METHOD'] == 'GET') {
- foreach ($_REQUEST as $key => $value) {
- $_REQUEST[$key] = urldecode( $value );
- }
- }
- /* strip tags so that php/sql/html injection fails. */
- foreach ($_REQUEST as $key => $value) {
- $_REQUEST[$key] = strip_tags($value);
- }
- }
- /* run this function first as a safety precaution */
- fixRequestData();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement