Xss.php snippet

    0

    0

    Ryan Wilson

    . '!';

    require_once('../_helpers/strip.php');

    // The name variable is now being properly sanitized, rendering the code safe from CSRF attacks.echo 'Hello, ' . stripslashes($_GET['name']) .

    <?php
    
    require_once('../_helpers/strip.php');
    
    // the `name` variable isn't getting sanitized, making it vulnerable// to a reflected Cross-Site Scripting vulnerability.echo 'Hello, ' . $_GET['name']
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Playground
    • Snippets
    • Cookbooks
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.