phpDocumentor default
[ class tree: default ] [ index: default ] [ all elements ]

Class: InputFilter

Source Location: /lodel/scripts/class.inputfilter.php

Class InputFilter

Property Summary
mixed   $attrArray  
mixed   $attrBlacklist  
mixed   $attrMethod  
mixed   $tagBlacklist  
mixed   $tagsArray  
mixed   $tagsMethod  
mixed   $xssAuto  

[ Top ]
Method Summary
String   decode()   Try to convert to plaintext
String   escapeString()  
Array   filterAttr()   Internal method to strip a tag of certain attributes
String   filterTags()   Internal method to strip a string of certain tags
void   inputFilter()   Constructor for inputFilter class. Only first parameter is required.
String   process()   Method to be called by another php script. Processes for XSS and specified bad code.
String   quoteSmart()  
String   remove()   Internal method to iteratively remove all unwanted tags and attributes
String   safeSQL()   Method to be called by another php script. Processes for SQL injection

[ Top ]
Properties
mixed   $attrArray [line 15]

[ Top ]
mixed   $attrBlacklist = array('action', 'background', 'codebase', 'dynsrc', 'lowsrc') [line 22]

[ Top ]
mixed   $attrMethod [line 18]

[ Top ]
mixed   $tagBlacklist = array('applet', 'body', 'bgsound', 'base', 'basefont', 'embed', 'frame', 'frameset', 'head', 'html', 'id', 'iframe', 'ilayer', 'layer', 'link', 'meta', 'name', 'object', 'script', 'style', 'title', 'xml') [line 21]

[ Top ]
mixed   $tagsArray [line 14]

[ Top ]
mixed   $tagsMethod [line 17]

[ Top ]
mixed   $xssAuto [line 20]

[ Top ]
Methods
decode  [line 263]

  String decode( String $source  )

Try to convert to plaintext

Parameters:
String   $source: 

API Tags:
Access:  protected


[ Top ]
escapeString  [line 319]

  String escapeString( $string, &$connection, String $source, Resource $connection  )

Parameters:
String   $source: 
Resource   $connection:  - An open MySQL connection
   $string: 
   &$connection: 

API Tags:
Access:  protected

Information Tags:
Author:  Daniel Morris
Author:  Chris Tobin

[ Top ]
filterAttr  [line 196]

  Array filterAttr( Array $attrSet  )

Internal method to strip a tag of certain attributes

Parameters:
Array   $attrSet: 

API Tags:
Access:  protected


[ Top ]
filterTags  [line 89]

  String filterTags( String $source  )

Internal method to strip a string of certain tags

Parameters:
String   $source:  - input string to be 'cleaned'

API Tags:
Return:  - 'cleaned' version of input parameter
Access:  protected


[ Top ]
inputFilter  [line 33]

  void inputFilter( [Array $tagsArray = array()], [Array $attrArray = array()], [int $tagsMethod = 0], [int $attrMethod = 0], [int $xssAuto = 1]  )

Constructor for inputFilter class. Only first parameter is required.

Parameters:
Array   $tagsArray:  - list of user-defined tags
Array   $attrArray:  - list of user-defined attributes
int   $tagsMethod:  - 0= allow just user-defined, 1= allow all but user-defined
int   $attrMethod:  - 0= allow just user-defined, 1= allow all but user-defined
int   $xssAuto:  - 0= only auto clean essentials, 1= allow clean blacklisted tags/attr


[ Top ]
process  [line 51]

  String process( Mixed $source  )

Method to be called by another php script. Processes for XSS and specified bad code.

Parameters:
Mixed   $source:  - input string/array-of-string to be 'cleaned'

API Tags:
Return:  - 'cleaned' version of input parameter
Access:  public


[ Top ]
quoteSmart  [line 303]

  String quoteSmart( String $source, &$connection, Resource $connection  )

Parameters:
String   $source: 
Resource   $connection:  - An open MySQL connection
   &$connection: 

API Tags:
Access:  protected

Information Tags:
Author:  Daniel Morris
Author:  Chris Tobin

[ Top ]
remove  [line 72]

  String remove( String $source  )

Internal method to iteratively remove all unwanted tags and attributes

Parameters:
String   $source:  - input string to be 'cleaned'

API Tags:
Return:  - 'cleaned' version of input parameter
Access:  protected


[ Top ]
safeSQL  [line 280]

  String safeSQL( Mixed $source, &$connection, Buffer $connection  )

Method to be called by another php script. Processes for SQL injection

Parameters:
Mixed   $source:  - input string/array-of-string to be 'cleaned'
Buffer   $connection:  - An open MySQL connection
   &$connection: 

API Tags:
Return:  - 'cleaned' version of input parameter
Access:  public


[ Top ]

Documentation generated on Thu, 24 Jul 2008 05:07:47 +0200 by phpDocumentor 1.4.0a2