[ Index ] |
PHP Cross Reference of Joomla 4.2.2 documentation |
[Source view] [Print] [Project Stats]
Joomla! Content Management System
Copyright: | (C) 2006 Open Source Matters, Inc. |
License: | GNU General Public License version 2 or later; see LICENSE.txt |
File Size: | 492 lines (19 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
InputFilter:: (8 methods):
__construct()
getInstance()
clean()
emailToPunycode()
isSafeFile()
decodeFileData()
decode()
stripUSC()
Class: InputFilter - X-Ref
InputFilter is a class for filtering input from any data source__construct($tagsArray = array() X-Ref |
Constructor for inputFilter class. Only first parameter is required. param: array $tagsArray List of user-defined tags param: array $attrArray List of user-defined attributes param: integer $tagsMethod The constant static::ONLY_ALLOW_DEFINED_TAGS or static::BLOCK_DEFINED_TAGS param: integer $attrMethod The constant static::ONLY_ALLOW_DEFINED_ATTRIBUTES or static::BLOCK_DEFINED_ATTRIBUTES param: integer $xssAuto Only auto clean essentials = 0, Allow clean blocked tags/attributes = 1 param: integer $stripUSC Strip 4-byte unicode characters = 1, no strip = 0 |
getInstance($tagsArray = array() X-Ref |
Returns an input filter object, only creating it if it doesn't already exist. param: array $tagsArray List of user-defined tags param: array $attrArray List of user-defined attributes param: integer $tagsMethod The constant static::ONLY_ALLOW_DEFINED_TAGS or static::BLOCK_DEFINED_TAGS param: integer $attrMethod The constant static::ONLY_ALLOW_DEFINED_ATTRIBUTES or static::BLOCK_DEFINED_ATTRIBUTES param: integer $xssAuto Only auto clean essentials = 0, Allow clean blocked tags/attributes = 1 param: integer $stripUSC Strip 4-byte unicode characters = 1, no strip = 0 return: InputFilter The InputFilter object. |
clean($source, $type = 'string') X-Ref |
Method to be called by another php script. Processes for XSS and specified bad code. param: mixed $source Input string/array-of-string to be 'cleaned' param: string $type The return type for the variable: return: mixed 'Cleaned' version of input parameter |
emailToPunycode($text) X-Ref |
Function to punyencode utf8 mail when saving content param: string $text The strings to encode return: string The punyencoded mail |
isSafeFile($file, $options = array() X-Ref |
Checks an uploaded for suspicious naming and potential PHP contents which could indicate a hacking attempt. The options you can define are: null_byte Prevent files with a null byte in their name (buffer overflow attack) forbidden_extensions Do not allow these strings anywhere in the file's extension php_tag_in_content Do not allow `<?php` tag in content phar_stub_in_content Do not allow the `__HALT_COMPILER()` phar stub in content shorttag_in_content Do not allow short tag `<?` in content shorttag_extensions Which file extensions to scan for short tags in content fobidden_ext_in_content Do not allow forbidden_extensions anywhere in content php_ext_content_extensions Which file extensions to scan for .php in content This code is an adaptation and improvement of Admin Tools' UploadShield feature, relicensed and contributed by its author. param: array $file An uploaded file descriptor param: array $options The scanner options (see the code for details) return: boolean True of the file is safe |
decodeFileData(array $data) X-Ref |
Method to decode a file data array. param: array $data The data array to decode. return: array |
decode($source) X-Ref |
Try to convert to plaintext param: string $source The source string. return: string Plaintext string |
stripUSC($source) X-Ref |
No description |
Generated: Wed Sep 7 05:41:13 2022 | Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer |