Skip to content

' '); DROP TABLE members; -- #1

@karagenit

Description

@karagenit

While this isn't super urgent (considering this is an "internal" form only filled out by team members) it might be something worth pointing out when you give your talk to IT.

I'm sure you're aware of this, but I didn't see a comment in the code about it (as with the hard-coded DB credentials :^) so I figured I'd mention it, as I think it's important that people learning PHP for the first time get into the right habits.

Because we're concatenating the parameters with the SQL query, it's vulnerable to an injection attack - I think PHP's MySQLi supports syntax like $con->query("INSERT INTO blah VALUES (?)", $value); such that the user input is always properly escaped.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions