Skip to content

Filter Input, Escape Output #13

Open
@auroraeosrose

Description

@auroraeosrose

Security is a mindset, not an after the fact addition

The db stuff does a good job of mentioning using bound params to deal with sql injection but there is nothing about the other end of security - FIEO

From the first moment POST and GET are mentioned and used the idea of filtering input (validating you got what you expected) and escaping output (a wrapper with htmlspecialchars would suffice for beginners) should be introduced

Just the basics are needed, nothing fancy - an output escaper function/method to use when echoing stuff out and the use of filter_var to make sure data is right from a POST is plenty good for a beginner level, but introducing the idea of "the user is a jerk and will try to break stuff" is good for beginning dev minds ;)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions