Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

No flood/duplicate post control...

(Page 2 of 2)
> >
Quote Reply
Re: [Alex] No flood/duplicate post control... In reply to
Alex,

Doing the MD5 of the message + a check by the username would the best approach. To eliminate the flooding, you would really only need to limit the session to about 60-90 seconds.

The chances of two messages having the same MD5 hash is about 10000000000000000000000000 : 1 - so it is definately a better idea then checking against the entire message.

That way no one user can post the same message within the alloted time frame.
Cheers,
Michael Bray
Quote Reply
Re: [Alex] No flood/duplicate post control... In reply to
Have you guys found a way of doing it without MD5ing the whole message yet? Curious as to how you are going to do it.
Cheers,
Michael Bray
Quote Reply
Re: [no one in paticular!] No flood/duplicate post control... In reply to
Hmm. Just picked up on this thread. Has anyone got their heads around the logic needed for this yet? Seems like quite a headache. Easily implemented, but who's got the logic right?

The only true way to avoid flooding would be to moderate the forum and approve/dissaprove posts, right?

- wil
Quote Reply
Re: [no one in paticular!] No flood/duplicate post control... In reply to
I take it you're using an AUTO_INCREMENT field in your database, and leaving it blank, so the database fills it in automaticlaly when the record is added? I've done this with my database too, and it is quite annoying that the ID isn't actually stored or even created until the record has been added.

There is no way to query the next available ID in an AUTO_INCREMENT field, is there? Maybe this would be a work around? Not for this problem maybe, but it would be well useful for my program ;-)

- wil
Quote Reply
Re: [Wil] No flood/duplicate post control... In reply to
Quote:
There is no way to query the next available ID in an AUTO_INCREMENT field,

Clearly not as it doesn't exist yet.....I suppose you could always grab the last ID and add 1 Angelic

Last edited by:

RedRum: Oct 17, 2001, 5:05 AM
Quote Reply
Re: [RedRum] No flood/duplicate post control... In reply to
No. What happens when you delete an record, it happens to be the last record. You're then querying the database for the last ID, which is going to be 2 less than the current ID as you deleted a record.

So that wouldn't work.

- wil
Post deleted by RedRum In reply to

Last edited by:

RedRum: Oct 17, 2001, 7:24 AM
Quote Reply
Re: [Wil] No flood/duplicate post control... In reply to
GForum has been generating a temporary ID all along to keep track of attachments (due to that fact that there isn't a post to attach attachments to yet when you upload one). The only change needed was to store this unique post ID in the post table along with the post, and then prevent a post if that ID already exists. The ID is made up of 35 random characters - I think 64 ^ 35 ought to yield enough different results to not hit duplicates accidentally :)

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com

Last edited by:

jagerman: Oct 20, 2001, 9:20 PM
Quote Reply
Re: [jagerman] No flood/duplicate post control... In reply to
Yep! Good idea.

- wil
> >