• Login
  • Register
  • Login Register
    Login
    Username:
    Password:
  • Home
  • Members
  • Team
  • Help
  • More
    • YouTube
    • Facebook
User Links
  • Login
  • Register
  • Login Register
    Login
    Username:
    Password:

    Quick Links Home Members Team Help
    More Subscribe YouTube Facebook
    D&D Forums - MyBB Plugins & Themes MyBB Ressources Free MyBB Themes Support How to Fix: "Authorization code mismatch" issue in MyBB 1.8.16+

     
    • 0 Vote(s) - 0 Average
    How to Fix: "Authorization code mismatch" issue in MyBB 1.8.16+
    OnlyTechNation
    Offline

    Junior Member

    Posts: 4
    Threads: 2
    Joined: Oct 2018
    Reputation: 0
    #1
    10-26-2018, 04:41 PM
    Original Post made by Shade at MyBB (I take NO credit for this fix)


    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:

    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.
    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.
    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.
    « Next Oldest | Next Newest »

    Users browsing this thread: 1 Guest(s)



    • View a Printable Version
    • Subscribe to this thread
    Forum Jump:

    D&D Company

    Home · Members · Team · Help · Contact

    © D&D - Powered by MyBB

    Paris, France

    07 53 04 58 86

    business@developement.design

    About the company We are a growing company of web developers & designers, specialized in MyBB plugins & themes. Our work is our propaganda.

    Linear Mode
    Threaded Mode