View Full Version : [fixed] guests can view other guests threads despite 'can view others threads' = no
Jake Bunce
Sat 22nd Dec '01, 7:23pm
http://www.macsubculture.com/
make sure you aren't logged into my forums if you have an account. follow the link and enter the first forum on the list called "M.S.C. Clan." for the "Unregistered / Not Logged In" group i have "Can view others' threads" permission set to no for that forum.
the problem is that guests can view threads in that forum still... but only threads started by guests it would seem.
wut up wit dat?
tubedogg
Sat 22nd Dec '01, 9:31pm
The reason is all guests have a userid of 0. The check for "can view other's threads" compares the userid of the thread starter to $bbuserinfo[userid] (meaning the user who is looking at the page). Since 0=0, they are shown them.
This would be a bug. Not sure if it is fixable though.
Moving...
Jake Bunce
Sat 22nd Dec '01, 9:57pm
bah! you are all fired! ;)
eva2000
Sat 22nd Dec '01, 11:17pm
Originally posted by Jakeman
bah! you are all fired! ;) okay then bye bye j/k
simple don't allow guests any viewable access forums :)
Jake Bunce
Sat 22nd Dec '01, 11:35pm
but i want them to see the forum with all the post numbers but then not be able to access. since i can't do that and keep my mods forum hidden at the same time i'm allowing them access but they can't see threads. http://130.94.172.202/images/smilies/devil.gif
eva2000
Sun 23rd Dec '01, 12:17am
Originally posted by Jakeman
but i want them to see the forum with all the post numbers but then not be able to access. since i can't do that and keep my mods forum hidden at the same time i'm allowing them access but they can't see threads. http://130.94.172.202/images/smilies/devil.gif you have some of the best smilies around love that little devil hehe
Jake Bunce
Sun 23rd Dec '01, 12:20am
Originally posted by eva2000
you have some of the best smilies around love that little devil hehe
that smilie was custom made by a guy on my forums named "cowofwar"
eva2000
Sun 23rd Dec '01, 12:22am
Originally posted by Jakeman
that smilie was custom made by a guy on my forums named "cowofwar" may i have permission to use it :D
Jake Bunce
Sun 23rd Dec '01, 1:30pm
Originally posted by eva2000
may i have permission to use it :D
i'll ask him :)
Jake Bunce
Sun 23rd Dec '01, 2:23pm
he says yes :)
John
Mon 24th Dec '01, 10:03am
Simple fix:
Line 55 (approx) showthread.php to:
if (!$getperms['canviewothers'] and ($thread['postuserid']!=$bbuserinfo['userid'] or $bbuserinfo['userid']==0)) {
Line 230 (approx) showthread.php to:
if (!$getperms['canviewothers'] and ($thread['postuserid']!=$bbuserinfo['userid'] or $bbuserinfo['userid']==0)) {
Line 304 (approx) forumdisplay.php to:
$limitothers="AND postuserid='$bbuserinfo[userid]' AND '$bbuserinfo[userid]'<>0";
This fix will change it so that guests cannot view anyone's posts if 'canviewothers' is set to 0.
John
eva2000
Mon 24th Dec '01, 10:38am
Originally posted by Jakeman
he says yes :) thanks and thank him too :D
Jake Bunce
Mon 24th Dec '01, 10:36pm
john, those mods broke those two scripts (white screen of death, hehe).
eva2000
Mon 24th Dec '01, 11:07pm
Originally posted by Jakeman
john, those mods broke those two scripts (white screen of death, hehe). :confused:
Jake Bunce
Mon 24th Dec '01, 11:46pm
white screen of death = when you access that php file all you get is a white browser screen for output.
looking at the mods... looks like extra curly brackets are introduced but not closed. :confused:
did i just do this wrong?
John
Wed 26th Dec '01, 10:37am
Jake,
The lines that you were meant to be replacing should have looked very similar to the lines I have posted above. Are you sure you got the right lines?
John
Jake Bunce
Wed 26th Dec '01, 1:57pm
two of the 3 lines were blank (the blank line between two sections of code to make things readable). i'll double check it on my end. i assume we are both talking about version 2.2.1. i am using MS Word 2000's "Goto Line X" feature.
tubedogg
Wed 26th Dec '01, 11:30pm
*eek* don't use Word to edit pure text files! Bad Jakeman! ;)
Seriously though use WordPad if you must, or get a real text editor like EditPlus or TextPad.
Jake Bunce
Wed 26th Dec '01, 11:50pm
Word to find line, Wordpad to edit. :)
eva2000
Wed 26th Dec '01, 11:56pm
or www.notetab.com :)
Jake Bunce
Fri 11th Jan '02, 2:35am
just got around to looking at this again. your fix works john... i just wasn't careful enough the first time around.
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.