- Joined
- Apr 7, 2010
- Messages
- 1,699
- Reaction score
- 420
zCMS isn't as great as everyone says you know 
Use VisualCCMS, I think it's better.
Use VisualCCMS, I think it's better.
I agree with Azaidi, zCMS ISNT as good as its cracked up to be. There are soooo many exploits still unpatched, had this on my hotel when I used VPS and it got hacked in the first 10minutes of opening.
We had to go patch each exploit ourselves, even the simple ones that shouldn't of been left open by it's "coder"
"exoh"
Yeah, no, shutup. You have no idea what you are talking about.
The "exploit" that I supposedly left in there is an unfiltered $_GET param that is actually left unfiltered in the stock copy of uber. So where's your theory now.
Exploit is in article.php btw. Enjoy. This is why Supa will stay private for a while before release - idiots like you.
You can't blame em if the CMS has exploits in there.
mysql_real_escape_string(stripslashes(trim( $_GET **** )))
Wow that's really hard :O
/**
* Cleans the inputted String
* Will protects against Basic SQL injections
* @param $_GET / $_POST
* @return Stripped Variable
*/
function cleanvar($s_string){
$sStr = Stripslashes($s_string);
$sTtr = Trim($sStr);
return $sTtr;
}
cleanvar($_GET[ADMINPASSWORDINPLAINTEXTISSOSAFE]);
Woa. Woa. Woa. Woa.
Stop there.
Do you even know what Realescape, Stripslashes, and Trim does?
You will only need Stripslashes & Trim, or you could do this
Functions Bro, Functions
PHP:/** * Cleans the inputted String * Will protects against Basic SQL injections * @param $_GET / $_POST * @return Stripped Variable */ function cleanvar($s_string){ $sStr = Stripslashes($s_string); $sTtr = Trim($sStr); return $sTtr; } cleanvar($_GET[ADMINPASSWORDINPLAINTEXTISSOSAFE]);
You do realize that if anything is going in, or coming out of a database you want to use mysql_real_escape_string right?
When you're trimming a string, you're basically removing whitespaces from both sides, which imo, could cause a lot of database confusion if someone posts a space before an e-mail or something. Stripslashes just removes backslashes.. Therefore the function you're using really isn't cleaning the string from any/all vulnerabilities that it may contain. That's where mysql_real_escape_string comes in handy. It removes specicial characters that could manipulate your SQL database.
So function or not, his code was still correct over yours... that is if your main intention was stripping the string completely clean. Goes to show that functions doesn't always make your code 'right'. It just makes it more organized, and dynamic... while also requiring less work down the line. Before moving onto functions you should at least understand the complete basics.
Not trying to offend you or anything either. =P
$db = new MySQLi("connection infos");
$string = "''''lol''''";
echo $db->real_escape_string($string);