Re: [PHP] addslahes and magic quote woes

2002-07-03 Thread Miguel Cruz
On Wed, 3 Jul 2002, Jean-Christian Imbeault wrote: > Erik Price wrote: >> Turn off magic_quotes and do addslashes() explicitly every time you do >> a database insert. Then make sure you always stripslash() data >> returned from a database query. >> >> magic_quotes is convenient for newbies, but

Re: [PHP] addslahes and magic quote woes

2002-07-03 Thread Richard Lynch
>magic_quotes is convenient for newbies, but after a while you'll find it >only trips you up, as you've discovered. Odd. In the 5 years I've been doing PHP, magic quotes has never hurt me in the least. It's just more convenient than calling addslashses() all over the place. And do you really

Re: [PHP] addslahes and magic quote woes

2002-07-03 Thread Erik Price
On Wednesday, July 3, 2002, at 10:21 AM, Jean-Christian Imbeault wrote: > Security question: Is turning off magic_quotes and using > strip/addslashes() a 100% effective solution against malicious user > input? No. Think about what {add|strip}slashes() does. It simply adds slashes to strin

Re: [PHP] addslahes and magic quote woes

2002-07-03 Thread 1LT John W. Holmes
From: "Jean-Christian Imbeault" <[EMAIL PROTECTED]> > Erik Price wrote: > > > > > > Turn off magic_quotes and do addslashes() explicitly every time you do a > > database insert. Then make sure you always stripslash() data returned > > from a database query. You don't need to strip slashes from d

Re[2]: [PHP] addslahes and magic quote woes

2002-07-03 Thread Latex Master
Hello Jean-Christian, The answer is NO NO NO. At the beginning you have talked about security. You have to realize that there is no 100% protection against hackers. Using strip/addslashes will help you to filter some user input not all. :) So try to pick one way and go that

Re: [PHP] addslahes and magic quote woes

2002-07-03 Thread 1LT John W. Holmes
Just pick one, and use only one. If you have magic_quotes ON, then you don't need addslashes, etc. ---John Holmes... - Original Message - From: "Jean-Christian Imbeault" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, July 03, 2002 9:40 AM Subject

Re: [PHP] addslahes and magic quote woes

2002-07-03 Thread Jean-Christian Imbeault
Erik Price wrote: > > Turn off magic_quotes and do addslashes() explicitly every time you do a > database insert. Then make sure you always stripslash() data returned > from a database query. > > magic_quotes is convenient for newbies, but after a while you'll find it > only trips you up, a

Re: [PHP] addslahes and magic quote woes

2002-07-03 Thread Erik Price
On Wednesday, July 3, 2002, at 09:40 AM, Jean-Christian Imbeault wrote: > I am trying to make my PHP safe against malicious data user inputs. > Reading up on this most people suggest using addslashes(), magic_quotes > on and other things like mysql_escape_string(); > > But I have been running

Re: [PHP] addslahes and magic quote woes

2002-07-03 Thread Jean-Christian Imbeault
Martin Clifford wrote: > Try stripslashes() before addslashes(), to ensure that it doesn't already contain slashes. > > HTH > > Martin But what if the original data contained a slash? I want to keep that slash in the data ... Jc -- PHP General Mailing List (http://www.php.net/) To uns

Re: [PHP] addslahes and magic quote woes

2002-07-03 Thread Martin Clifford
Try stripslashes() before addslashes(), to ensure that it doesn't already contain slashes. HTH Martin >>> Jean-Christian Imbeault <[EMAIL PROTECTED]> 07/03/02 09:40AM >>> I am trying to make my PHP safe against malicious data user inputs. Reading up on this most people suggest using addslashe

[PHP] addslahes and magic quote woes

2002-07-03 Thread Jean-Christian Imbeault
I am trying to make my PHP safe against malicious data user inputs. Reading up on this most people suggest using addslashes(), magic_quotes on and other things like mysql_escape_string(); But I have been running into the problem that I mess up the user's input because I use more then one of th