Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get_profile_link escapes & in profile URL due to htmlspecialchars, breaks URL #4793

Open
AniLeo opened this issue Mar 31, 2024 · 0 comments
Open

Comments

@AniLeo
Copy link

AniLeo commented Mar 31, 2024

Hello,

On MyBB 1.8.37 (and ever since I remember), the profile URL in the contact form is escaped in a way where it breaks the URL.

For instance:
Expected: https://forums.rpcs3.net/member.php?action=profile&uid=1
Actual: https://forums.rpcs3.net/member.php?action=profile&uid=1

The & is escaped to &, breaking the URL.

Culprit code is:

function get_profile_link($uid=0)

$user = htmlspecialchars_uni($mybb->user['username']).' - '.$mybb->settings['bburl'].'/'.get_profile_link($mybb->user['uid']);

To reproduce, you need to be logged into a forum account, and use the contact.php form to send a message. Then check the received email and see the user profile URL in the email.

Let me know if you need further details,
Ani

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant