Forum Permissions bug

by Lonestar

Thu Jun 06, 2024 3:28 pm
Administrator
1599 Posts
I bug was pointed out to me by DesignWicked. It appears anonymous users can post into the forums, even if they do not have permission to do so.

So for the time being, if you do not wish anonymous users to post in your forums, I suggest setting the module to registered user access only for the time being, until I can get the time to fix this permission bug.

I have a lot going in IRL right now. So just do not have the time to fix this just yet. But I will get it fixed.

Cheers,

- The Nuke-Evolution Xtreme Team -
Thankful People 3 user(s) is/are thankful for this post.
Tue Feb 25, 2025 7:01 pm
Member
2 Posts
I experienced this issue, despite the Forum permission being set properly in the Forum Admin area.  I fixed it with the below line of code in the modules (backslash) Forums (backslash) posting.php file:

Code: [ Select all ]

if ( $userdata['session_logged_in'] == 0 ) {
   message_die( GENERAL_MESSAGE, sprintf( $lang['Sorry_' . $is_auth_type ], $is_auth[ $is_auth_type . "_type"] ) );
}

Search the posting.php file for some of the below code.  In my file, it started at about line 358.  The completed code should look like the below after your modifications.

Code: [ Select all ]

} else {
   message_die( GENERAL_MESSAGE, $lang['No_such_post'] );
}

if ( $userdata['session_logged_in'] == 0 ) {
   message_die( GENERAL_MESSAGE, sprintf( $lang['Sorry_' . $is_auth_type ], $is_auth[ $is_auth_type . "_type"] ) );
}

// The user is not authed, if they're not logged in then redirect
// them, else show them an error message
if ( ! $is_auth[ $is_auth_type ] ) {

Save the file and Anonymous users will not be able to post a new topic or reply in the forums you have configured as such.

Hope this helps!
Tue Feb 25, 2025 7:08 pm
Administrator
1599 Posts
The bug has already been fixed in the update. Thanks though Smile

Cheers,

- The Nuke-Evolution Xtreme Team -
Wed Feb 26, 2025 3:06 pm
Member
2 Posts
In what version/update?  I have 2.0.10 installed and had to put in that line of code to fix it.
Wed Feb 26, 2025 5:16 pm
Administrator
1599 Posts
The new update I am working on 2.0.11. But there is nothing stopping anyone from using this fix, until the update it ready.

Cheers,

- The Nuke-Evolution Xtreme Team -
Thu Feb 27, 2025 12:18 am
Administrator
1599 Posts
This permission bug is actually still happening on my local, and now thanks to megaboost I have fixed the issue. I will be posting the fixed files in to this forum thread tomorrow.

I will need a little more time to post this fix, fixing this problem, caused another bug, I am working on a fix now.

Cheers,

- The Nuke-Evolution Xtreme Team -
Sun Mar 02, 2025 11:55 am
Administrator
1599 Posts
Here is the updated authorization fix. I have updated 2.0.11 with these new fixes. Thanks again megaboost

Just simple upload the file in the "includes" folder to your "public_html" directory.

Cheers,

- The Nuke-Evolution Xtreme Team -