Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[F] portal.php links to guest user profiles [C-Michael83]
#1
This user has been denied support. This user has been denied support.
If a posting / thread listed on portal.php was written by a guest, the guest name is still a link to the profile page member.php?action=profile&uid=0

Steps to reproduce:
Configure MyBB to allow posting for guests, write a thread as a guest, make that thread show up on the portal page (in the main column).
#2
Well, we don't expect guests to publish announcements... Toungue

But yeah seems like a bug

----

In the latest thread on the side, links of last poster won't link to profiles of users because of this code:
		// Don't link to guest's profiles (they have no profile).
		if($thread['lastposteruid'] == 0)
		{
			$lastposterlink = $thread['lastposter'];
		}
		else
		{
			$lastposterlink = build_profile_link($thread['lastposter'], $thread['lastposteruid']);
		}
and the template use just '{$lastposterlink}', but in the case of the announcements (where the bug occur), we don't check if it's a guest and the template uses '<a href="{$mybb->settings['bburl']}/{$announcement['profilelink']}">{$announcement['username']}</a>'.
Should be the same method...
Creativity is a drug I cannot live without.
[Image: 1]Support PM will be ignored
#3
Thank you for your bug report.

This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated.

With regards,
MyBB Group
#4
This fix seems to have caused the username not to display at all now, it now ends up like the following:

Posted by: - Today 12:45 AM - No Replies 

Tested on the latest trunk as of 17-03-09 - 3.00PM GMT.

#5
Sorry. Try this (internal code only):

Find:
if($announcement['uid'] == 0)
{
	$profilelink = htmlspecialchars_uni($announcement['username']);
}

replace with

if($announcement['uid'] == 0)
{
	$profilelink = htmlspecialchars_uni($announcement['threadusername']);
}
#6
(03-17-2009, 06:41 PM)Ryan Gordon Wrote: Sorry. Try this (internal code only):

Find:
if($announcement['uid'] == 0)
{
	$profilelink = htmlspecialchars_uni($announcement['username']);
}

replace with

if($announcement['uid'] == 0)
{
	$profilelink = htmlspecialchars_uni($announcement['threadusername']);
}

That seems to have fixed it Smile.



Forum Jump:


Users browsing this thread: 1 Guest(s)