MyBB Community Forums

Full Version: New thread redirect is wrong.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
This is probably intentional but due to the un-optimal error_no_permission page being so general it should be changed.

The following code in newthread.php is incorrect when the user has permission to create but not to see threads:
		// This is just a normal thread - send them to it.
		else
		{
			// Visible thread
			$lang->redirect_newthread .= $lang->redirect_newthread_thread;
			$url = get_thread_link($tid);
		}

It should check for viewing permissions and use a proper redirection message and url.
A check for $forumpermissions['canviewthreads'] and $forumpermissions['canviewthreads'] is necessary.
"$forumpermissions['canviewthreads'] and $forumpermissions['canviewthreads']" what? Toungue

But yeah, I agree. Note that it may apply to other places too.
Can create threads permission Toungue
Hi,

Thank you for your report. We have pushed this issue to our Github repository for further analysis where you can track our commits and progress with fixing this bug. Discussions regarding this bug may also take place there too.

Follow this link to visit the issue on Github: https://github.com/mybb/mybb/issues/2088

Thanks for contributing to MyBB!

Regards,
The MyBB Group