Download presentation
Presentation is loading. Please wait.
1
Chapter 13 Security Methods Part 2
2
xss.php Script 13.4 on page 436 ch13\xss.php Enter <script>alert(“Ha!”);</script>
3
XSS Attacks It could create a pop-up window Steal cookies
Redirect the browser to other sites.
4
htmlentities() Turn problem characters into HTML entities (taken literally. No special meaning.) & -> & “ -> " < -> < > -> >
5
strip_tags() Removes all HTML and PHP tags
6
calculator.php Script 13.5 on pages 439-440
ch13\calculator.php
7
filter_var() if(filter_var($var,FILTER_VALIDATE_INT) if(filter_var($var,FILTER_VALIDATE_INT, array(‘min_range’ => 0, ‘max_range’ => 120))
8
Validation Filters FILTER_VALIDATE_EMAIL FILTER_VALIDATE_FLOAT
FILTER_VALIDATE_INT FILTER_VALIDATE_URL
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.