Conditions | 3 |
Paths | 4 |
Total Lines | 29 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
29 | function inte() |
||
30 | { |
||
31 | $xss = $this->security->xss(); |
||
32 | $sanitise = $this->security->sanitise(); |
||
33 | |||
34 | |||
35 | echo "\nXSS"; |
||
36 | $unCleanString = 'Visit my website http://www.doajob.org?redirect=https://www.google.com'; |
||
37 | |||
38 | |||
39 | echo "\nUnclean String: " . $unCleanString; |
||
40 | $cleanString = $xss->clean($unCleanString); |
||
41 | echo "\nXSS Cleaned String: " . $cleanString; |
||
42 | $cleanString = $xss->cleanUrl($unCleanString); |
||
43 | echo "\nXSS Cleaned Url: " . $cleanString; |
||
44 | echo "\n"; |
||
45 | |||
46 | echo "\nSanitised Url: " . $sanitise->removeUrl($unCleanString); |
||
47 | if ($sanitise->isSanitised()) { |
||
48 | echo "\n1"; |
||
49 | } |
||
50 | |||
51 | echo "\nString without a Url: " . $sanitise->removeUrl("Rob WIlson"); |
||
52 | if ($sanitise->isSanitised()) { |
||
53 | echo "\n1"; |
||
54 | } |
||
55 | |||
56 | |||
57 | } |
||
58 | |||
60 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.