Thread Rating:
  • 8 Vote(s) - 3.88 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not Solved Authorization code mismatch? PLEASE READ (FIX INCLUDED)
Not Solved
MyBB 1.8.16 introduces some crucial changes aimed towards better security regarding users authentication. Templates containing login forms must be updated in order to comply with these changes; otherwise, you will stumble upon the following error:

Quote:Authorization code mismatch. Are you accessing this function correctly? Please go back and try again.

If you have upgraded to 1.8.16 or above, please read the following instructions carefully.

Templates requiring changes:
  • error_nopermission
  • header_welcomeblock_guest
  • member_login
  • portal_welcome_guesttext
1. Localize form tag
Open each template and look for <form action="member.php" *>. They are the forms you use when logging in. The form tag will likely include other attributes, which you can ignore.

2. Add token
Add after <form action="member.php"> the following piece of code:

<input name="my_post_key" type="hidden" value="{$mybb->post_code}" />

It's that simple. Your users will now be able to login again. my_post_key input is in fact now mandatory to be sent alongside other form parameters in order to reduce potential malicious attacks.

Note that upgrade scripts will revert naïve templates and will handle the change automatically. This guide is aimed at all who have custom themes with these templates customized.
[Image: fSGNVQj.png]

Forum Jump:

Users browsing this thread: 2 Guest(s)