note 116653 added to filter.examples.sanitization

From: Date: Thu, 05 Feb 2015 13:59:05 +0000
Subject: note 116653 added to filter.examples.sanitization
Groups: php.notes 
Request: Send a blank email to php-notes+get-201594@lists.php.net to get a copy of this message
If we omit using a filter then PHP by default puts a filter which is FILTER_DEFAULT which will use default filter. Now the question is what is a default filter. A default filter is unsafe_raw which will allow the unsafe raw data passed on to the server. This value is available in php.ini file. It is suggested that a developer should update this value inside php.ini file as under: filter.default = full_special_chars filter.default_flags = 0 Whereas in php.ini file above values are by default, set as under: ;filter.default = unsafe_raw ;filter.default_flags = Above semicolons are commented out lines so surely one needs to remove those semicolons to apply the changes made. If we do not do above things then what will happen. In that case PHP will use default filter which would surely be FILTER_UNSAFE_RAW and one can see that unsafe raw data can then be passed onto server which can make the life a hacker easier. ---- Server IP: 72.52.91.14 Probable Submitter: 39.32.79.46 ---- Manual Page -- http://php.net/manual/en/filter.examples.sanitization.php Edit -- https://master.php.net/note/edit/116653 Del: integrated -- https://master.php.net/note/delete/116653/integrated Del: useless -- https://master.php.net/note/delete/116653/useless Del: bad code -- https://master.php.net/note/delete/116653/bad+code Del: spam -- https://master.php.net/note/delete/116653/spam Del: non-english -- https://master.php.net/note/delete/116653/non-english Del: in docs -- https://master.php.net/note/delete/116653/in+docs Del: other reasons-- https://master.php.net/note/delete/116653 Reject -- https://master.php.net/note/reject/116653 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#201594) next »