Skip to content

pmeulen/xpath-filter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XPath filter PoC

This is a proof of concept for a simple regular expression-based XPath filter function for detecting XPahs that could cause a DoS by taking too long to evaluate.

Run tests

./composer install
./vendor/bin/phpunit

Usage

use XPATH_FILTER\xpath_filter;

new xpath_filter();

// OK
xpath_filter::filter("//ElementToEncrypt[not(@attribute='value')");

// Throws
xpath_filter::filter('count(//. | //@* | //namespace::*)');

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages