Solved: 5 Years, 5 Months, 2 Weeks ago [Error Message] Authorization code mismatch
#11
Solved: 5 Years, 5 Months, 2 Weeks ago
(2019-06-25, 05:05 AM)effone Wrote: Looks like you have a similar problem like this:
https://community.mybb.com/thread-222952...pid1329491

Which caching system you are using and what type of hosting?

You can, however, bypass the check temporarily (AT YOUR OWN RISK) so that things start working until you get a solution.
https://community.mybb.com/thread-223288.html

We are under a managed VPS and on Cloudflare as well

Should I be changing my caching settings?
https://gyazo.com/dc7fce1967d185496e8c4e7c04874a5b
https://gyazo.com/9f79c741c24b3e792c8a646b92884574
Reply
#12
Solved: 5 Years, 5 Months, 2 Weeks ago
The earlier user had similar combination.
There are 3 parameters in consideration for generating the key for guests. Would have been best to identify which one is being modified on each page refresh. I suspect session ID is the culprit.

Can you paste this line at the very end of your global.php? This will produce 2 key values at the top of your site.

printf( "Session ID: %s <br>Internal Key: %s", $session->sid, $mybb->settings['internal']['encryption_key']);

Now logout and as a guest monitor those keys. Please tell us which one (or both) is changing on every page refresh.
This may help troubleshooting further...
Reply
#13
Solved: 5 Years, 5 Months, 2 Weeks ago
(2019-06-25, 08:51 AM)effone Wrote: The earlier user had similar combination.
There are 3 parameters in consideration for generating the key for guests. Would have been best to identify which one is being modified on each page refresh. I suspect session ID is the culprit.

Can you paste this line at the very end of your global.php? This will produce 2 key values at the top of your site.

printf( "Session ID: %s <br>Internal Key: %s", $session->sid, $mybb->settings['internal']['encryption_key']);

Now logout and as a guest monitor those keys. Please tell us which one (or both) is changing on every page refresh.
This may help troubleshooting further...

Only session ID
https://i.gyazo.com/c26f15fbe620698a3752...75fddf.mp4
Reply
#14
Solved: 5 Years, 5 Months, 2 Weeks ago
OK, please delete the previous code in global.php add this line:
echo $mybb->post_code;

Now open inc/functions.php and go to line number ~627, identify this line:

return md5($session->sid.$mybb->config['database']['username'].$mybb->settings['internal']['encryption_key']);

Replace with:

return md5($session->packedip.$mybb->config['database']['username'].$mybb->settings['internal']['encryption_key']);

Save the file. Logout. Monitor the same way if the code displayed at the top of your site is changing on every refresh.
Reply
#15
Solved: 5 Years, 5 Months, 2 Weeks ago
(2019-06-25, 09:32 AM)effone Wrote: OK, please delete the previous code in global.php add this line:
echo $mybb->post_code;

Now open inc/functions.php and go to line number ~627, identify this line:

return md5($session->sid.$mybb->config['database']['username'].$mybb->settings['internal']['encryption_key']);

Replace with:

return md5($session->packedip.$mybb->config['database']['username'].$mybb->settings['internal']['encryption_key']);

Save the file. Logout. Monitor the same way if the code displayed at the top of your site is changing on every refresh.

The code showing does not change every refresh
Reply
#16
Solved: 5 Years, 5 Months, 2 Weeks ago
Keep the change made in inc/functions.php. Delete the added echo line from global.php.
Your problem looks to be resolved.

Now check logging in. You should not see the "Authorization code mismatch" error.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)