This is a very basic tutorial and I'm sure some of you may know how to this.
Now, MyBB has a Avatar Vuln, allowing to grab server IP's when uploading Avatar. Such a method can be a threat to your forum, if you want to keep your IP protected.
Now, there're 2 ways of doing this:
1. Using a Proxy
2. Removing the ability to use URL Avatar Linking
Using a Proxy:
1. First, open the path in FTP public_html/inc/ and open up the following file: functions.php
2. Search for line 5584. The code will look like:
3. We have to replace the 127.0.0.1 IP address with our proxy's IP address. If you're using a HTTP proxy, replace CURLPROXY_SOCKS5 with CURLPROXY_HTTP. By default, it is set to be a socket type proxy.
Removing URL Upload via Template:
1. Login to your Admin and go to AdminCP > Templates & Themes > Templates > Your Theme > User Control Panel > usercp_avatar and then replace it with this code:
And, you're done. Now, you can enjoy being safe.
Regards,
Stapleton 🤝
Now, MyBB has a Avatar Vuln, allowing to grab server IP's when uploading Avatar. Such a method can be a threat to your forum, if you want to keep your IP protected.
Now, there're 2 ways of doing this:
1. Using a Proxy
2. Removing the ability to use URL Avatar Linking
Using a Proxy:
1. First, open the path in FTP public_html/inc/ and open up the following file: functions.php
2. Search for line 5584. The code will look like:
PHP Code
<?php
curl_setopt($ch, CURLOPT_PROXY, "127.0.0.1");
curl_setopt($ch, CURLOPT_PROXYPORT, "8080");
curl_setopt($ch, CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
3. We have to replace the 127.0.0.1 IP address with our proxy's IP address. If you're using a HTTP proxy, replace CURLPROXY_SOCKS5 with CURLPROXY_HTTP. By default, it is set to be a socket type proxy.
Removing URL Upload via Template:
1. Login to your Admin and go to AdminCP > Templates & Themes > Templates > Your Theme > User Control Panel > usercp_avatar and then replace it with this code:
PHP Code
<?php
<html>
<head>
<title>{$mybb->settings['bbname']} - {$lang->change_avatar}</title>
{$headerinclude}
</head>
<body id="forums">
{$header}
<table width="100%" border="0" align="center">
<tr>
{$usercpnav}
<td valign="top">
{$avatar_error}
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="theadborder">
<tr>
<td class="thead" colspan="2">{$lang->change_avatar}</td>
</tr>
</table>
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="trow1" colspan="2">
<table cellspacing="0" cellpadding="0" width="100%"><tr>
<td>{$lang->avatar_note}{$avatarmsg}
</td>
{$currentavatar}
</tr></table>
</td>
</tr>
<tr>
<td class="tcat" colspan="2">{$lang->local_galleries}</td>
</tr>
<tr>
<td class="trow2">{$lang->gallery}</td>
<td class="trow2">
<form method="post" action="usercp.php">
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" /><input type="hidden" name="action" value="avatar" />
<select name="gallery">
{$galleries}
</select>
{$gobutton}
</form>
</td>
</tr>
<tr>
<td class="tcat" colspan="2">{$lang->custom_avatar}</td>
</tr>
<tr>
<td class="trow1" width="40%">{$lang->avatar_upload}</td>
<td class="trow1" width="60%">
<form enctype="multipart/form-data" action="usercp.php" method="post">
<input type="hidden" name="my_post_key" value="{$mybb->post_code}" />
<input type="file" name="avatarupload" size="25" class="fileupload" />
{$auto_resize}
</td>
</tr>
[b]<!--[/b] DeleteAvatarButton -->
</div>
</td>
</tr>
</table>
</form>
{$footer}
</body>
</html>
And, you're done. Now, you can enjoy being safe.
Regards,
Stapleton 🤝


