MyBB Community Forums

Full Version: What error is this/? I am confused
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am so much confused right now my brain stopped working. When I activate myalearts plugin it gives me this error and whole website crashes http500 error Dodgy , and when I deactivate it the forum starts to work again.

[27-Dec-2022 08:30:30 UTC] PHP Fatal error:  Uncaught Error: Class 'OUGC_Awards_MyAlerts_Formatter' not found in /home/dekrim/public_html/inc/plugins/ougc_awards.php:1996
Stack trace:
#0 /home/dekrim/public_html/inc/class_plugins.php(142): ougc_awards_global_start('')
#1 /home/dekrim/public_html/global.php(100): pluginSystem->run_hooks(Array)
#2 /home/dekrim/public_html/index.php(18): require_once('/home/dekrim/pu...')
#3 {main}
  thrown in /home/dekrim/public_html/inc/plugins/ougc_awards.php on line 1996


For some resason OUGC awards isn't working with myalearts in mybb

// MyAlerts alert formatter
function ougc_awards_global_start()
{
if(class_exists('MybbStuff_MyAlerts_AlertFormatterManager'))
{
global $mybb, $lang, $awards;

$formatterManager = MybbStuff_MyAlerts_AlertFormatterManager::getInstance();

$formatterManager or $formatterManager = MybbStuff_MyAlerts_AlertFormatterManager::createInstance($mybb, $lang);

$formatterManager->registerFormatter(new OUGC_Awards_MyAlerts_Formatter($mybb, $lang, 'ougc_awards'));
}
}

Please help someone how to fix it.

Do not want to downgrade my ougc awards because it is exploitable 


# Exploit Title: MyBB OUGC Awards Plugin v1.8.3 - Cross-Site Scripting
# Date: 12/31/2018
# Author: 0xB9
# Twitter: @0xB9Sec
# Contact: 0xB9[at]pm.me
# Software Link: https://community.mybb.com/mods.php?action=view&pid=396
# Version: 1.8.3
# Tested on: Ubuntu 18.04
# CVE: CVE-2019-3501


1. Description:
OUGC Awards plugin for MyBB forum allows admins and moderators to grant awards to users which displays on profiles/posts. The reason input isn't sanitized on awards page and user profiles.
 

2. Proof of Concept:

- Have a mod account level or higher
- Go to Manage Awards in ModCP
- Give an award to a user and input payload for reason   <script>alert('XSS')</script>

- Payload executes when viewing award on awards.php and user profiles.


3. Solution:
Update to 1.8.19


Now this error

[27-Dec-2022 09:01:11 UTC] PHP Fatal error:  Uncaught Error: Call to undefined function OUGC_Awards_MyAlerts_Formatter() in /home/dekrim/public_html/inc/plugins/ougc_awards.php:1996
Stack trace:
#0 /home/dekrim/public_html/inc/class_plugins.php(142): ougc_awards_global_start('')
#1 /home/dekrim/public_html/global.php(100): pluginSystem->run_hooks(Array)
#2 /home/dekrim/public_html/index.php(18): require_once('/home/dekrim/pu...')
#3 {main}
  thrown in /home/dekrim/public_html/inc/plugins/ougc_awards.php on line 1996

I've fixed it. Activating my alearts first then activating OUGC awards fixes the problem. If OUGC awards in active before activating myalearts, the forum crashes.

First activate Myalearts Plugin
Secondly activate OUGC Awards plugin