Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Edit -> delete url change BUG
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Edit -> delete url change BUG

 Post Reply Post Reply Page  12>
Author
Marino2 View Drop Down
Newbie
Newbie
Avatar

Joined: 23 October 2004
Location: Switzerland
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote Marino2 Quote  Post ReplyReply Direct Link To This Post Topic: Edit -> delete url change BUG
    Posted: 23 October 2004 at 11:20am

Originally posted by -boRg- -boRg- wrote:


If you give a normal user permission to delete posts they can only delete their own posts and only before a reply is made to that post. Once someone has posted a reply the only person who can delete the previous post is the forum admin or a modertor.


Hello,
As you mentionned, I gave the permission to delete posts to members but I noticed that one of them could nevertheless delete his posts AFTER a reply was made !
I asked him and he told me that he just changed in the url showed, the "edit_post.asp" page with "delete_post.asp" keeping the same parameters

Example:
http://www.events-gallery.ch/forum/edit_post.asp?PID=46803&PN=0&TPN=1

replaced by
http://www.events-gallery.ch/forum/delete_post.asp?PID=46803&PN=0&TPN=1

And so he is able to delete all his old posts after a reply is made.

I use version 7.7. I've made a search in this forum before asking, but I couldn't find a post with this bug explained. In case of a post exists about it, just give me the link.

Many thanks


PS: I had a problem with my first subscription to this forum, so you could delete the user "Marino".

Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 23 October 2004 at 2:10pm
I shall look into the problem.
Back to Top
Marino2 View Drop Down
Newbie
Newbie
Avatar

Joined: 23 October 2004
Location: Switzerland
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote Marino2 Quote  Post ReplyReply Direct Link To This Post Posted: 25 October 2004 at 9:46am

Thank you, because he's know sending MP's with modified links hidden behind pictures or fake links to others members and then they delete their own messages without knowing 

Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 25 October 2004 at 11:01am
Then maybe it's time to suspend this persons account to prevent him from doing such things.
Back to Top
Marino2 View Drop Down
Newbie
Newbie
Avatar

Joined: 23 October 2004
Location: Switzerland
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote Marino2 Quote  Post ReplyReply Direct Link To This Post Posted: 25 October 2004 at 6:25pm

But one or more others could do the same in the future, the problem will exists until it is solved...

Well, for the moment I've forbidden the deletion of posts, except for mods and admins and the trick could not be used anymore.
Hope someone will do a patch for that, thanks in advance.

Cheers

Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 26 October 2004 at 5:27am
I am working on it, but as it will mean allot of work and changing of code there will not be a quick fix, so it will not be available for the present version.
Back to Top
MadDog View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 01 January 2002
Status: Offline
Points: 3008
Post Options Post Options   Thanks (0) Thanks(0)   Quote MadDog Quote  Post ReplyReply Direct Link To This Post Posted: 26 October 2004 at 2:04pm
For a temp fix you could set edit and delete permissions to admin only. That would make it so admins could be the only one allowed to edit or delete posts.
Back to Top
ljamal View Drop Down
Mod Builder Group
Mod Builder Group


Joined: 16 April 2003
Status: Offline
Points: 888
Post Options Post Options   Thanks (0) Thanks(0)   Quote ljamal Quote  Post ReplyReply Direct Link To This Post Posted: 26 October 2004 at 3:20pm
Try this right after line 147 in delete_post.asp
It should work, but I haven't tested it. Basically it checks to see if the threads has any posts after the user's post. If there are posts then only an admin or mod can delete the post.

Let me know if it works and I'll release it as a MOD or maybe borg will add it to correct the current release.


' LJAMAL MOD 26 OCT 2004
' CORRECTS THE ABILITY FOR USERS TO DELETE POST BY CHANGING URL
If lngDelMsgAuthorID = lngLoggedInUserID then
     Dim RSCheck
     Set RSCheck = Server.CreateObject("ADODB.Recordset")
     strSQL = "select " & strDbTable & "Thread.Thread_ID From "& strDbTable & "Thread WHERE " &_
                 strDbTable &"Thread.Topic_ID in (select "&strDbTable &"Thread.Topic_ID from " & strDbTable & "Thread where "&_
                 strDbTable & "Thread.Thread_ID =" & lngMessageID & ") and "&_
                 strDbTable &"Thread.Message_date > (select "&strDbTable &"Thread.Message_date from " & strDbTable & "Thread where "&_
                 strDbTable & "Thread.Thread_ID =" & lngMessageID & ");"

     RSCheck.Open strSQL, adoCon

     if not RSCheck.EOF then
           blnDelete = False
     end if
     RSCheck.Close
     Set RSCheck = Nothing
end if
' END MOD


This has been updated to correct the flawed code. The code above has been tested and corrects the flaw.

Edited by ljamal
Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.