Skip to content

Use input filtering in the PDO section #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

onethumb
Copy link
Contributor

@onethumb onethumb commented Jul 8, 2012

Since the section right above suggests (rightly) to use input filtering, makes sense that we should use it at the critical junction of inserting into the DB, even if PDO does properly sanitize it. It's both safer and helps the tutorial build on previous examples in a cohesive way.

@codeguy codeguy closed this in 948a58d Jul 8, 2012
@codeguy
Copy link
Owner

codeguy commented Jul 8, 2012

Site is now running from gh-pages branch... I copied your code there and credited you in the commit message. Fork from that branch for future changes. Thanks for the contribution! Keep em' coming.

onethumb added a commit to onethumb/php-the-right-way that referenced this pull request Jan 5, 2015
Somehow, this pull request (codeguy#26) went missing in the move to `gh-pages`.  But it's fairly critical, since the example has `$_GET` being passed straight into a `PDO` statement.  On a write (`INSERT` or `UPDATE`), this can still result in dangerous data (to the app, not to SQL) being written accidentally by a new PHP developer.  Data should always be filtered prior to use.
petk pushed a commit to petk/php-the-right-way that referenced this pull request Jan 23, 2017
petk pushed a commit to petk/php-the-right-way that referenced this pull request Jan 23, 2017
petk pushed a commit to petk/php-the-right-way that referenced this pull request Jan 23, 2017
Переформулировка, опечатки
petk pushed a commit to petk/php-the-right-way that referenced this pull request Jan 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants