Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

No flood/duplicate post control...

(Page 1 of 2)
> >
Quote Reply
No flood/duplicate post control...
Just noticed you can post repeatedly with the same text. Or reply to a post with the same text. Or just hit back and have fun! Wink I think that feature is pretty important for the public release.


Muhammad
Quote Reply
Re: [Muhammad] No flood/duplicate post control... In reply to
It can easily be implemented by checking the title and description/post/message and UserID via querying the Post table. If there is an exact match, then serve up an error message or redirect to the forum where the user was at when he/she posted a topic.

I have this in my forum software built on LINKS SQL.
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [AnthroRules] No flood/duplicate post control... In reply to
Unfortunately it's not so easy - you can't do = with a TEXT/BLOB field on Oracle or MS SQL (not sure about postgres).

I think I'll have to use some sort of random ID that generates when you start to write a new post. Then if you attempted to post with the same ID, you would get an error message.

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [jagerman] No flood/duplicate post control... In reply to
Or you could simply pull the ID of the post, and then check for that ID.
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [AnthroRules] No flood/duplicate post control... In reply to
The problem is that the ID doesn't exist until after you have posted, so there is no way to pass the ID as form input since it doesn't exist yet... Hence a unique post id other than the primary post_id column. Actually, there already _is_ a temporary ID used for identifying which attachments go with which post, so it shouldn't be too big a modification - just a matter of storing it with the post.

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [jagerman] No flood/duplicate post control... In reply to
Really?

Pugdog wrote a MOD for Links SQL v.1.X that pulls the ID of the record and sends it as part of the email confirmation.

Couldn't that same logic be applied for this issue?
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [AnthroRules] No flood/duplicate post control... In reply to
The post_id isn't known until after the post has been inserted into the database, and is figured out when the post is inserted. To put the protection there, we would have to know the post_id BEFORE inserting it, which can't be done... After inserting, we can do whatever we want with the post ID, but there is no way to adjust the information that will be sent when the user pressed "reload" on their browser and resubmits the form data. Hence the need for a independant random post ID that is generated as soon as you start writing a post (or reply).

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [Muhammad] No flood/duplicate post control... In reply to
You can always do it with some javascript. Well this would prevent multiple posts of the same post, but not different posts in a small interval of time...

Adrian
Quote Reply
Re: [jagerman] No flood/duplicate post control... In reply to
Okay...then why does the mod that Alex provides works for Link SQL v.1.X:

http://gossamer-threads.com/...mp;ubb=000547:Forum9

?????
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [AnthroRules] No flood/duplicate post control... In reply to
It gets the ID after the link is inserted. To know what the ID is going to be before even MySQL knows it is impossible.

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [jagerman] No flood/duplicate post control... In reply to
Okay...still seems like if you pull the ID like the codes that Alex provided, you can add codes to query the POSTS table in the "process_form" sub that checks the ID.

I understand what you saying, but it still seems like an easy fix to check the ID added.
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [AnthroRules] No flood/duplicate post control... In reply to
Check it for what, though?

I make a post, and let's say it gets post_id '123'.

Then, I hit refresh on my browser, and that post gets '124'. Or maybe someone has posted in the meantime and it gets '125' - there's not really any way to know. No matter how many times you hit refresh, you are never going to get post_id '123' again, so there's no way it can be used.

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [jagerman] No flood/duplicate post control... In reply to
I didn' read the whole post cause I am lazy, but if I was going to implement something to stop flooding the same message I would have a "Post Session" table, and store the MD5 hash of the message in there.

When you submit the post it does an MD5 of the message and compares it to posts in the "Post Session" table, and if the same message has been posted in the last 5 mins, don't let it go through...

Anyway - Thats an easy way to do it cause you are dealing with strings that are 32 characters long, rather then a huge post.

Cheers,

Michael Bray
Quote Reply
Re: [Michael_Bray] No flood/duplicate post control... In reply to
That's already exactly what I've done, and it's working just fine Wink

(Locally, of course, not here yet)

Jason Rhinelander
Gossamer Threads
jason@gossamer-threads.com
Quote Reply
Re: [jagerman] No flood/duplicate post control... In reply to
Yea...but you neglected to implement this for REPLIES...

See the below link:

http://www.gossamer-threads.com/...?post=163523;#163523
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [jagerman] No flood/duplicate post control... In reply to
Yea...but you neglected to implement this for REPLIES...

See the below link:

http://www.gossamer-threads.com/...?post=163523;#163523

OR look below at all the duplicate replies I submitted...Wink

========================================
Buh Bye!

Cheers,
Me

Last edited by:

AnthroRules: Oct 14, 2001, 9:32 AM
Quote Reply
Re: [jagerman] No flood/duplicate post control... In reply to
Yea...but you neglected to implement this for REPLIES...

See the below link:

http://www.gossamer-threads.com/...?post=163523;#163523
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [jagerman] No flood/duplicate post control... In reply to
Yea...but you neglected to implement this for REPLIES...

See the below link:

http://www.gossamer-threads.com/...?post=163523;#163523
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [jagerman] No flood/duplicate post control... In reply to
When someone tries to submit a duplicate post, you should put an error message like "You have already submitted your post" or redirect the user to the Post that they submitted.
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [AnthroRules] No flood/duplicate post control... In reply to
Quote:
That's already exactly what I've done, and it's working just fine

(Locally, of course, not here yet)


Quote Reply
Re: [RedRum] No flood/duplicate post control... In reply to
Uh...REDRUM ( I mean PAUL WILSON)...it is working for POSTING but NOT REPLIES...TRY IT YOURSELF!

And I do mean here in the GT Support Forums, not in the released version of GT Forums, GOT IT?

========================================
Buh Bye!

Cheers,
Me

Last edited by:

AnthroRules: Oct 14, 2001, 9:38 AM
Quote Reply
Re: [AnthroRules] No flood/duplicate post control... In reply to
Right now I can post duplicates and reply with the same message multiple times, just as I could yesterday. So, I don't see any change made here yet.


Muhammad
Quote Reply
Re: [Muhammad] No flood/duplicate post control... In reply to
Welp, I guess not...I thought that when I posted a post and tried submitting it again, it didn't appear, but after refreshing the forum page, the duplicate post appeared...

Oh well...may be Jason will add it soon.
========================================
Buh Bye!

Cheers,
Me
Quote Reply
Re: [AnthroRules] No flood/duplicate post control... In reply to
Yes, that would be nice. Wink


Muhammad
Quote Reply
Re: [Michael_Bray] No flood/duplicate post control... In reply to
Quote:
When you submit the post it does an MD5 of the message and compares it to posts in the "Post Session" table, and if the same message has been posted in the last 5 mins, don't let it go through...

What about a flood of 'me too' posts. ;) Guess include a check by the same user. Not sure I like the idea of having to md5 the entire message.

Cheers,

Alex
--
Gossamer Threads Inc.
> >