Login   Register  
PHP Classes
elePHPant
Icontem

CSP Filter

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us

  Author  
Picture of Michael A. Peters
Name: Michael A. Peters <e-mail contact>
Packages: 6 Browse all classes by Michael A. Peters Browse all classes by
Country: United States United States - PHP jobs in United States
Age: 40
All time rank: 903119 in United States United States
Week rank: 458 Up44 in United States United States Up
Innovation award
Innovation award
Nominee: 2x


  Detailed description   Download .zip .tar.gz  
This class can be used to filter HTML based on Content Security Policy.

It takes a DOM Document object loaded with the structure of an HTML document and process it to find violations of the Content Security Policy definition.

The class changes the document structure to filter and enforce the policy definitions, so the application can serve a compliant HTML document.

  Classes of Michael A. Peters  >  CSP Filter  >  Download .zip .tar.gz  >  Support forum Support forum  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: CSP Filter
Base name: cspfilter
Description: Filter HTML based on Content Security Policy
Version: 0.25
PHP version: 5.0
License: Custom (specified in a license file)
All time users: 464 users
All time rank: 5121
Week users: 0 users
Week rank: 2369 Equal
 
  Groups   Rate classes User ratings   Dependencies   Applications   Files Files  

  Groups  
Group folder image HTML HTML generation and processing View top rated classes
Group folder image PHP 5 Classes using PHP 5 specific features View top rated classes
Group folder image Security Security protection and attack detection View top rated classes


  Innovation Award  
PHP Programming Innovation award nominee
April 2009
Number 9
When displaying HTML content submitted to a site by untrusted users, you need to be careful to not allow cross-site scripting and cross-site request forgery security exploits that can be performed by specially crafted HTML and Javascript.

Mozilla foundation people have defined a Content Security Policy that defines which HTML elements can be or not be included in a page.

This class can filter untrusted HTML using Mozilla Content Security Policy rules.

Manuel Lemos

  User ratings  
There are not enough user ratings to display for this class.

  Packages needed by this class  
Class Dependency Why it is needed
IDNA Convert
Optional
convert to punycode

  Applications that use this class  
No application links were specified for this class.
Add link image If you know an application of this package, send a message to the author to add a link here.
  Files folder image Files  
File Role Description
Plain text file cspfilter_class.php Class The class file
Accessible without login Plain text file dom_script_test.php Example Class Playground
Accessible without login Plain text file ifobtest.php Aux. Example iframe/object
Accessible without login Plain text file index.php Example Example Script
Accessible without login Plain text file license.txt Lic. CPL License
Accessible without login HTML file README.html Doc. Documentation
Accessible without login Plain text file READMETXT.txt Doc. Setting up examples
Accessible without login Image file testimage.jpg Photo Example Image
Accessible without login Plain text file testscript.js Data Example JS

Download all files: cspfilter.tar.gz cspfilter.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.