Jump to content
MakeWebGames

Gang Forum Privacy Fix


Isomerizer

Recommended Posts

Ok, i found a little bug in the gang forums. Users from other gangs can view other gangs forums. This is v1, it may be an issue in v2 too. Heres the fix...

Open yourgang.php and find:

 

$tpcd=mysql_query("SELECT t.*,u1.* FROM gangforums_topics t LEFT JOIN users u1 ON t.gft_userid=u1.userid WHERE t.gft_id={$_GET['t']}",$c);

 

Replace with:

 

$tpcd=mysql_query("SELECT t.*,u1.* FROM gangforums_topics t LEFT JOIN users u1 ON t.gft_userid=u1.userid WHERE t.gft_id={$_GET['t']} AND t.gft_gangid={$ir['gang']}",$c);

 

Find:

 

$pq=mysql_query("SELECT r.*,u.* FROM gangforums_replies r LEFT JOIN users u ON r.gfr_userid=u.userid WHERE r.gfr_topic={$_GET['t']} ORDER BY gfr_posttime ASC;",$c);

 

Replace with...

 

$pq=mysql_query("SELECT r.*,u.* FROM gangforums_replies r LEFT JOIN users u ON r.gfr_userid=u.userid WHERE r.gfr_topic={$_GET['t']} AND r.gfr_gangid={$ir['gang']} ORDER BY gfr_posttime ASC;",$c);

 

Done, now it'll stop them nosy users. :P

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...