Jump to content

we have a hacker on my forum


Monkuar

Recommended Posts

if (isset($ibforums->input['star'])) {
if ($ibforums->input['star'] > $this->member['max_stars']){
//They trying to hack my stars...
$std->Error2("You cannot choose a star you don't have access to...");
}else{
$DB->query("UPDATE ibf_members set star='{$ibforums->input['star']}' WHERE id='".$this->member['id']."'");
}

 

Max stars is set at as 0

 

I put my tamper data plugin to try to perform how the hacker hacked, and put -125 or any - number and it worked.

 

how does it work thougih? when the  -1235 is not greater then 0?  Max_stars is at 0

Read your conditional statement again, and use the values you set out above.

 

if ($ibforums->input['star'] > $this->member['max_stars']){
//They trying to hack my stars...
$std->Error2("You cannot choose a star you don't have access to...");

 

It says, "IF -1235 is greater than ZERO, that's an error condition. Otherwise, since -1235 is NOT greater than zero, update the database"

Read your conditional statement again, and use the values you set out above.

 

if ($ibforums->input['star'] > $this->member['max_stars']){
//They trying to hack my stars...
$std->Error2("You cannot choose a star you don't have access to...");

 

It says, "IF -1235 is greater than ZERO, that's an error condition. Otherwise, since -1235 is NOT greater than zero, update the database"

 

ok, my bad overlooked it.

 

I need to check now if it's negative tho, so I can echo out "Stop being Nawty"

 

is there a php function that helps and protects all - inputs and turns them positive?  I have a lot of fixing up to do.. he hacked everything

abs will return the absolute value, but you probably should just make it a validation error instead.

 

if( $ibforums->input['star'] > $this->member['max_stars'] || $ibforums->input['star'] < 0 ) {

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.