10-26-2018, 04:41 PM
Original Post made by Shade at MyBB (I take NO credit for this fix)
If your template does not have the <form action="member.php"> code at all, you are still required to add the new code into the template. Just paste the code somewhere and save the template.
This should fix your login issue. Please give credit where credit is do.
Quote: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:NOTE: You MUST edit all your themes that are causing this issue. Most custom themes may not have the<form action="member.php">. It might be labeled something a little different, but it will have the "<form action=", just paste your new code underneath it and save your template.
Quote: Wrote: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 [i]<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:
[/i]Code:<input name="my_post_key" type="hidden" value="{$mybb->post_code}" />
None
Select All
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.
If your template does not have the <form action="member.php"> code at all, you are still required to add the new code into the template. Just paste the code somewhere and save the template.
This should fix your login issue. Please give credit where credit is do.