Skip to content

Commit f40f5e7

Browse files
authored
Merge pull request #4 from JBlond/development
Development
2 parents 232bbb5 + 36f3a3d commit f40f5e7

File tree

4 files changed

+23
-6
lines changed

4 files changed

+23
-6
lines changed

composer.json

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,26 @@
22
"name": "jblond/php-xss-filter",
33
"description": "PHP XSS Filter",
44
"license": "MIT",
5+
"keywords": [
6+
"php",
7+
"xss"
8+
],
59
"authors": [
610
{
711
"name": "JBlond",
812
"email": "[email protected]"
913
}
10-
]
14+
],
15+
"require": {
16+
"php" : ">= 5.6"
17+
18+
},
19+
"require-dev": {
20+
"ext-mysqli": "*"
21+
},
22+
"autoload": {
23+
"psr-4": {
24+
"jblond\\": "lib/jblond"
25+
}
26+
}
1127
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<?php
2+
namespace jblond;
23
/**
34
* xss_filter
45
*

sqlinjection.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
<?php
22
header('Content-Type: text/html; charset=utf-8');
33

4-
require './xss_filter.class.php';
5-
$xss = new xss_filter();
4+
require './lib/jblond/xss_filter.class.php';
5+
$xss = new jblond\xss_filter();
66

77
$string = "teilnehmer_nr=1&singleTarif=1 AND (SELECT * FROM (SELECT(SLEEP(5)))lVqc)&abschlussart=jahresabschluss&reisebeginn=-1&reiseende=-1&beginnJahresVers=1445292000&teilnmAlter=29&weltgeltung=1";
88

99
echo $xss->filter_it($string) . '<br><br><br>';
1010

11-
$mysqli = new mysqli("localhost", "root", "", "mysql");
11+
$mysqli = new \mysqli("localhost", "root", "", "mysql");
1212

1313
/* check connection */
1414
if (mysqli_connect_errno()) {

test_nasty_strings.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php
22
header('Content-Type: text/html; charset=utf-8');
33

4-
require './xss_filter.class.php';
5-
$xss = new xss_filter();
4+
require './lib/jblond/xss_filter.class.php';
5+
$xss = new jblond\xss_filter();
66

77
// load über nasty test
88
$test_lines = file('teststrings/blns.txt',FILE_SKIP_EMPTY_LINES);

0 commit comments

Comments
 (0)