PDA

View Full Version : User point scam


Nordinho
06-27-2006, 11:51 PM
Users get pretty creative finding holes in the system.

The latest one: writing scripts to insert spaces in a post. The post looks like a regular short one, but in fact (if you edit it) there's a while lot of spaces it it. But they get points for the whole length of a post.

One other issue, editing posts gives negative points. On if a member banks all his points and somehow get's into a negative amount (probably a rounding issue), they can't access their profiles anymore...

And a suggestion:

Don't count quoted words in the pointcount. You should see how popular quoting has become all of a sudden ;)

Thanks for all the work!!

CMX_CMGSCCC
06-28-2006, 02:10 PM
The editing post issue will be fixed in v1.5.7 as I have redone the editing points calculation entirely.

As far as removing extra spaces before points calculation, I'll look into that as well as the remove bb code before points calcuation.

As far as the quoting issue, it would have to remove the quote before hand, so it will have to be processed too.

All good ideas, I'll think of the best way to implement them optimized.

-CMX

Nordinho
06-28-2006, 05:39 PM
Thanks!!

CMX_CMGSCCC
06-29-2006, 03:14 PM
Does anyone know how to remove spaces in a row.

Like for example:


$string = str_replace(" ", " ", "tes t i n g");


Will that return "tes t i n g"?

I guess I could answer this on my own, I'll just test it out lol

EDIT: I just checked it returns "tes t i n g", anyone know how to remove alll extra white space as in double spaces completely? Will preg_replace work?

-CMX

majorxp
06-29-2006, 07:52 PM
One of these two will work for you:




$string = str_replace(array(" "), '', $string);
$string = preg_replace('/\s+/','', $string);






OR..you can also use one of these to leave one space between words, but kill multiple spaces.



$string = str_replace(array(" "), '', $string);
$string = preg_replace('/\s\s+/','', $string);

CMX_CMGSCCC
06-29-2006, 10:41 PM
Yes, I just discovered this by reading php.net's preg_replace function comments, it will be in for v1.5.7 for release tomorrow.

-CMX

Nordinho
06-30-2006, 08:08 AM
Thanks again ;)