Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Sin Bin Mod
 New Topic  Reply to Topic
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 2

PPSSWeb
Junior Member

312 Posts

Posted - 17 May 2007 :  09:14:57  Show Profile  Reply with Quote
Now that I understand the problem better, I can reproduce it too. Unfortunately the code addition suggested above by Jezmeister did not fix it. I do however get a EOF error if I try posting with a username that does not exist in the database.<
Go to Top of Page

PPSSWeb
Junior Member

312 Posts

Posted - 17 May 2007 :  10:42:34  Show Profile  Reply with Quote
Ok, so the code posted above does work! At least I think it does. Just not where it was said to add it. Instead add it to the same location in Post.asp.

If the user is not logged in, the new code returns MemberID = -1. But nothing in the usergroups mod is set to check for this, so you need to add that bit too.

A little further down the page in Post.asp find:
	'#######    Begin UserGroup MOD     #######	
if isDeniedMember(strRqForumID,MemberID) = 1 then
Go_Result "You have been denied access to this forum"
end if
if isReadOnly(strRqForumID,MemberID) = 1 then
Go_Result "Your access to this forum is read-only"
end if
'####### End UserGroup MOD #######


and replace it with:
	'#######    Begin UserGroup MOD     #######	
If MemberID < 1 Then
Go_Result "You must be logged in to Post to this forum"
End IF
if isDeniedMember(strRqForumID,MemberID) = 1 then
Go_Result "You have been denied access to this forum"
end if
if isReadOnly(strRqForumID,MemberID) = 1 then
Go_Result "Your access to this forum is read-only"
end if
'####### End UserGroup MOD #######


Someone please check this and see if the two parts combined fix the problem. Thanks<

Edited by - PPSSWeb on 17 May 2007 10:43:05
Go to Top of Page

Jezmeister
Senior Member

United Kingdom
1141 Posts

Posted - 17 May 2007 :  11:12:50  Show Profile  Visit Jezmeister's Homepage  Reply with Quote
That would solve the issue, I was avoiding doing that as it removes the option to post one off while not logged in which may well not be desirable.<
Go to Top of Page

PPSSWeb
Junior Member

312 Posts

Posted - 17 May 2007 :  13:53:21  Show Profile  Reply with Quote
I agree there has to be a better way, but this is all I could think of at the time.

I guess you could add generic member to the database. Then add a line to modify the MemberID if the DB query returns -1.

Something like:
if mLev < 1 and strDBNTUserName <> "" then
'Get userid from strdbntusername
strSql = "SELECT * FROM "& strTablePrefix &"MEMBERS WHERE M_NAME='"& strDBNTUserName &"'"
rsid = my_Conn.Execute(strSql)
MemberID = rsid("MEMBER_ID")
set rsid = nothing
If MemberID = "-1" Then
MemberID = "<Generic User ID>"
End If

End if


Then you could restrict that account however you like via the UserGroups Admin functions. Does that make it any better, or just more confusing?


Scratch that, the above idea doesn't work. Of course, it seems that the addition Jezmeister mentioned above doesn't seem to add anything. The MemberID seems to return -1 with or without this code for guests for me.<

Edited by - PPSSWeb on 17 May 2007 14:46:04
Go to Top of Page

PPSSWeb
Junior Member

312 Posts

Posted - 17 May 2007 :  14:53:12  Show Profile  Reply with Quote
Is there a way to add a default user to the Members database with an ID of -1 and Mlev of 0 that could be used in the Usergroups to specify permissions for users that are not logged in?<
Go to Top of Page

Jezmeister
Senior Member

United Kingdom
1141 Posts

Posted - 17 May 2007 :  15:08:39  Show Profile  Visit Jezmeister's Homepage  Reply with Quote
there is a better way about this ;) it's the use of lots of queries in post_info.asp based on strDBNTUserName to detect usergroup... it's just relatively a lot of work. Etymon has also suggested the use of Huws old posting restrictions mod alongside the usergroups mod to do it... i have a copy just don't have time to do anything at the moment.

the reason there will be no quick way to fix post_info is because the entirity of the usergroups mod on the end of the user is based on cookies, when you post with that method the cookie isn't there and thus the usergroups mod is useless as it is.<
Go to Top of Page

CalloftheHauntedMaster
Junior Member

289 Posts

Posted - 17 May 2007 :  15:12:51  Show Profile  Reply with Quote
PPSSWeb, the fix you provided works, and it also prohibits all non-logged in posting, as Jezmeister said.

However, that might not be such a bad thing either.<

This account was hacked into by Image, a very honest guy as you all can see! Stealing people's passwords is his pasttime. Beware of this, before you register at his forums!
Go to Top of Page

AnonJr
Moderator

United States
5768 Posts

Posted - 17 May 2007 :  15:33:34  Show Profile  Visit AnonJr's Homepage  Reply with Quote
Actually, if you're going through all the work of installing the UserGroup MOD to refine permissions, it wouldn't be a bad idea at all to prohibit users from posting if they are not logged in. Esp. if you tie anything else into the UserGroup permissions.

I've found that being able to post without logging in creates some other interesting issues better discussed at another time in another thread. <
Go to Top of Page

CalloftheHauntedMaster
Junior Member

289 Posts

Posted - 17 May 2007 :  15:39:29  Show Profile  Reply with Quote
Works for me. I can finally use the temp forum ban feature without all these bypasses. <

This account was hacked into by Image, a very honest guy as you all can see! Stealing people's passwords is his pasttime. Beware of this, before you register at his forums!
Go to Top of Page

PPSSWeb
Junior Member

312 Posts

Posted - 17 May 2007 :  16:01:31  Show Profile  Reply with Quote
quote:
Originally posted by Jezmeister

there is a better way about this ;) it's the use of lots of queries in post_info.asp based on strDBNTUserName to detect usergroup... it's just relatively a lot of work. Etymon has also suggested the use of Huws old posting restrictions mod alongside the usergroups mod to do it... i have a copy just don't have time to do anything at the moment.

the reason there will be no quick way to fix post_info is because the entirity of the usergroups mod on the end of the user is based on cookies, when you post with that method the cookie isn't there and thus the usergroups mod is useless as it is.



Yeah, I was trying to work around this by trying to have the guest user assume another identity temporarily, but that just wasn't working out. It did however bend my brain a little trying to work it out.

quote:
Originally posted by AnonJr

Actually, if you're going through all the work of installing the UserGroup MOD to refine permissions, it wouldn't be a bad idea at all to prohibit users from posting if they are not logged in. Esp. if you tie anything else into the UserGroup permissions.



My thoughts exactly. If you are going to go through all the effor, might as well lock it all down.

quote:
Originally posted by CalloftheHauntedMaster

Works for me.



Glad I could help then. <
Go to Top of Page

secretsquirrel
New Member

Australia
81 Posts

Posted - 19 June 2007 :  12:40:55  Show Profile  Visit secretsquirrel's Homepage  Reply with Quote
Glad my topic gave you something to think over
My forum is restricted to members only so its ok here but it would be funny if it was done so anyone trying to get around the ban and making a post get a warning that the attempt has been detected, email sent to admin and ban extended by a further week lol <

Anyone who says a square peg does not fit into a circular hole has never seen a crazy bítch with a hammer
Go to Top of Page
Page: of 2 Previous Topic Topic Next Topic  
Previous Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.12 seconds. Powered By: Snitz Forums 2000 Version 3.4.07