[Fwd: Re: [PHP] Explanation in Shiflett's PHP Security Briefing]

2005-06-09 Thread [EMAIL PROTECTED]
Hm? Didn't see this one yesterday on the list? Let's try again :) -afan Chris Shiflett wrote: You forgot to filter your input. Shame! :-) Escaping alone can save you in many cases, but always filter input and escape output. I confess: I didn't forget. I did it just wrong :( Even I thought

[PHP] Explanation in Shiflett's PHP Security Briefing

2005-06-08 Thread [EMAIL PROTECTED]
I was reading PHP Security Briefing from brainbulb.com (Chris Shiflett) and didn't get one thing: in example: ?php $clean = array(); if (ctype_alnum($_POST['username'])) { $clean['username'] = $_POST['username']; } ? why to set the $clean as array? what's wrong if I use:

Re: [PHP] Explanation in Shiflett's PHP Security Briefing

2005-06-08 Thread Richard Davey
Hello afan, Monday, June 6, 2005, 6:39:09 PM, you wrote: aan I was reading PHP Security Briefing from brainbulb.com (Chris Shiflett) aan and didn't get one thing: aan in example: aan ?php aan $clean = array(); aan if (ctype_alnum($_POST['username'])) aan { aan

Re: [PHP] Explanation in Shiflett's PHP Security Briefing

2005-06-08 Thread [EMAIL PROTECTED]
Thanks Richard. I got the point Chris was making: never believe _GET/_POST and use ctype_alnum(), mysql_real_escape_string(), htmlentities() - and I already started :) (Thanks Chris that was great for us beginners, already posted on few Bosnian php forums :)) My question though was is the

Re: [PHP] Explanation in Shiflett's PHP Security Briefing

2005-06-08 Thread Chris Shiflett
[EMAIL PROTECTED] wrote: I was reading PHP Security Briefing from brainbulb.com (Chris Shiflett) and didn't get one thing: in example: ?php $clean = array(); if (ctype_alnum($_POST['username'])) { $clean['username'] = $_POST['username']; } ? why to set the $clean as array?

Re[2]: [PHP] Explanation in Shiflett's PHP Security Briefing

2005-06-08 Thread Richard Davey
Hello afan, Wednesday, June 8, 2005, 4:33:24 PM, you wrote: aan My question though was is the difference in code I mentioned just aan a habit of writing code or there is some more? Some security aan issues too? It was most likely just a coding habit - there was no discernable difference between

Re: [PHP] Explanation in Shiflett's PHP Security Briefing

2005-06-08 Thread Matthew Weier O'Phinney
* [EMAIL PROTECTED] [EMAIL PROTECTED] : Thanks Richard. I got the point Chris was making: never believe _GET/_POST and use ctype_alnum(), mysql_real_escape_string(), htmlentities() - and I already started :) (Thanks Chris that was great for us beginners, already posted on few Bosnian php

Re: [PHP] Explanation in Shiflett's PHP Security Briefing

2005-06-08 Thread Chris Shiflett
[EMAIL PROTECTED] wrote: I got the point Chris was making: never believe _GET/_POST and use ctype_alnum(), mysql_real_escape_string(), htmlentities() - and I already started :) (Thanks Chris that was great for us beginners, already posted on few Bosnian php forums :)) You're welcome. :-) I

Re: [PHP] Explanation in Shiflett's PHP Security Briefing

2005-06-08 Thread [EMAIL PROTECTED]
First, thanks guys for such a fast response :) Matthew Weier O'Phinney wrote: While the above would prevent most SQL injections, it could still wreak havoc with your database. For instance, what if your 'phone' or 'zip' fields in your database are integer fields, and text gets passed from