twentyfour
New Member
- Nov 16, 2014
- 16
- 3
Hey everyone, just wanted to say this is my first post on any forum ever, so don't hurt my feelings.
^-^
While working on my retro that I started a couple months back, I've learned a good bit about PHP, but I'm still far from an expert. I'm fairly advanced with HTML and CSS, so I'm not a noob (unlike a lot of cheap hotel owners I see). However, I ripped some code from a cms sometime ago for the Homes page (honestly forgot which cms it was) and i saw this little bit of code:
I've seen some talk about cleaning variables and what not here on the forums, but why? If that code wasn't there how could a hacker exploit my cms? I use Rev btw.
Also, the CMS I'm building for my retro is almost complete, and I would really appreciate it if anybody experienced in server-side coding could test its security (ethically, of course). Just PM me.
^-^
While working on my retro that I started a couple months back, I've learned a good bit about PHP, but I'm still far from an expert. I'm fairly advanced with HTML and CSS, so I'm not a noob (unlike a lot of cheap hotel owners I see). However, I ripped some code from a cms sometime ago for the Homes page (honestly forgot which cms it was) and i saw this little bit of code:
PHP:
function clean($str) {
$str = @trim($str);
if(get_magic_quotes_gpc()) {
$str = stripslashes($str);
}
return mysql_real_escape_string($str);
}
I've seen some talk about cleaning variables and what not here on the forums, but why? If that code wasn't there how could a hacker exploit my cms? I use Rev btw.
Also, the CMS I'm building for my retro is almost complete, and I would really appreciate it if anybody experienced in server-side coding could test its security (ethically, of course). Just PM me.