Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Gordon Jiroux
8,728 PointsSQL Injection course
@Staff, If it's not in the works yet, I'm hoping a series on protecting against SQL Injection is coming soon... My fear is that new students will know only enough to be dangerous from a security standpoint when developing a site), leaving the site vulnerable... With what's been taught thus far, someone could drive a car through the SQL queries and php pages... Maybe even a "Pen-Testing" course/badge.
I understand this is a HUGE topic, but even helper methods to remove and/or replace dangerous phrases, and characters, etc., from variables would be a start.
13 Answers
Alan Johnson
7,625 PointsGreat ideas, Gordon Jiroux. I'm tagging Nick Pettit and Randy Hoyt here to make sure they see your suggestion!
Randy Hoyt
Treehouse Guest TeacherI don't think we've covered SQL and PHP together anywhere yet. Could you point me to the video or section that you think has the problem?
(I will be covering MySQL/PHP in an upcoming project, and I will most definitely using PDO to prevent SQL injections.)
Gordon Jiroux
8,728 PointsThanx @Alan Johnson,
In the interim, or if a course on SQL injection won't be produced. I think at the very least, least a quick video pointing out that it's a real concern, and that students should research what injection is, why it's bad, and how to find out what steps to preventing it are, would be beneficial.
Gordon Jiroux
8,728 PointsThat's great to hear... "read" :)
I realize that they haven't been covered together yet, but that some curious students may take their own "deep-dives", and that's why I was hoping "Injection Protection" would be covered in an upcoming video....
In the meantime, I'm sure there are students are putting 2 and 2 together, and researching how to incorporate php & mysql
The first question I asked myself after completing the php and database courses was "OK, did I miss some videos on incorporating php & sql"? ... If I didn't already know how to, and were like some other students I've seen posting on the forums (developing sites in tandem with learning how to), I probably would've gone out and researched it, not realizing the hidden dangers lurking beneath the surface.
Gordon Jiroux
8,728 PointsAs always, I think you guys are doing a great job... just wanted to throw 2 cents into the wishing well... :)
Randy Hoyt
Treehouse Guest TeacherThanks for the suggestion! :-) I'll see what we might want to do before I get to the next project that will cover this in depth.
Chad Shores
Courses Plus Student 8,868 PointsMost frameworks will handle this for you.
Erik Cruz
9,684 PointsGordon Jiroux
8,728 PointsI agree, however IMHO, someone should learn how to code things manually rather than becoming solely reliant on frameworks...
Too many people know how to implement frameworks, without knowing know how they are built, let alone how to build them. Now, I don't expect that Treehouse will show someone how to build a framework, but I do expect that one would learn the skills needed (raw development, not just frameworks and other 3rd party stuff) to figure it out on their own.... and thus far, I think Treehouse is doing a great job with the training material, and it's presentation...
James Barnett
39,199 PointsFor future forum searchers interested in PHP & SQL injection ...
Here's a great article on protecting against SQL injections in a PHP applications
There also this tutorial on writing secure PHP
Gordon Jiroux
8,728 PointsI have a few too good links too, but have been hesitant about pointing outside of Treehouse
Alan Johnson
7,625 PointsGordon Jiroux Feel free to point outside of Treehouse - we definitely understand that we don't live in a vacuum. Thanks for all the great feedback!
Chad Shores
Courses Plus Student 8,868 PointsHave any students on Treehouse actually had a problem with SQL injection?