note 85037 added to language.oop5.patterns
| From: | Anonymous at osu1 dot php dot net | Date: | Tue, 12 Aug 2008 12:48:39 +0000 |
| Subject: | note 85037 added to language.oop5.patterns | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-143392@lists.php.net to get a copy of this message | ||
Apologies to tedmasterweb, since I was incorrect in my note just prior. His sanitizing method would
work, since it is based on known values from a switch statement. I had read it too quickly as the
more common method of simply appending ".php" to variable values used in include
directives in order to ensure that included files are PHP files, like so in a common __autoload
variety often seen in the wild:
<?php
function __autoload($class) {
require_once("path/to/classes/$class.php");
}
?>
This was the sort of unsafe usage of the include directives I was commenting on.
----
Server IP: 69.147.83.197
Probable Submitter: 65.220.74.200
----
Manual Page -- http://www.php.net/manual/en/language.oop5.patterns.php
Edit -- https://master.php.net/note/edit/85037
Del: integrated -- https://master.php.net/note/delete/85037/integrated
Del: useless -- https://master.php.net/note/delete/85037/useless
Del: bad code -- https://master.php.net/note/delete/85037/bad+code
Del: spam -- https://master.php.net/note/delete/85037/spam
Del: non-english -- https://master.php.net/note/delete/85037/non-english
Del: in docs -- https://master.php.net/note/delete/85037/in+docs
Del: other reasons-- https://master.php.net/note/delete/85037
Reject -- https://master.php.net/note/reject/85037
Search -- https://master.php.net/manage/user-notes.php