Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Authorization code mismatch errors
#1
Hi all,

I have a newly installed mybb, latest version. I also installed a basic template and made a few tweaks in the css to make it themed similar to my site.

I had this installed on a temporary domain, everything has been going well. Login functions work as they should.

I finally switched over to the permanent domain, changed the domain in the settings/setup.

However I cannot login under the permanent domain without getting .......

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


But if I change the settings back to the temporary domain, I can login just fine. I assume this isn't a template issue if I can login with the temp domain but not the permanent one.

I have deleted cookies in Firefox, still the same.

Getting a bit frustrating this problem!

Thanks.
Reply
#2
https://community.mybb.com/thread-218862...pid1309973
https://community.mybb.com/thread-222521...pid1326897
[Image: logo.svg.svg]
Reply
#3
(05-08-2019, 10:15 AM)effone Wrote: https://community.mybb.com/thread-218862...pid1309973
https://community.mybb.com/thread-222521...pid1326897

I am also currently experiencing the same issue, i have tried all fixes including these but still having errors, even logging in from portal which somehow works but still not.

I am currently using MyBB 1.8.20 with PHP Version 7.3.5 with Flatty Template, however this is stil present in Default template as well.
Reply
#4
(05-11-2019, 06:50 AM)nofeara Wrote: I am also currently experiencing the same issue, i have tried all fixes including these but still having errors, even logging in from portal which somehow works but still not.
I am currently using MyBB 1.8.20 with PHP Version 7.3.5 with Flatty Template, however this is stil present in Default template as well.

Well to be honest this was an issue in the previous version , however i have noticed that after upgrading the board to 1.8.20 this problem has spiked a lot then 1.8.19

and most of the solutions given on the board don't work any more ..

Deleting cookies , cache , changing browsers , resetting passwords , nothing works .. in some times even i have to delete the members and ask him to register again and it still exists .. obviously all the skin templates are made sure that they are on the latest versions ..
Start Your Own Forum With a Trusted , Honest & Powerful Webhost ..[Image: 593eddba.png]
Reply
#5
Get it straight. You need to pass the post key with your form $_POST submission some way or other.
Simple as that.
If you are not capable of implementing official modifications I have provided alternate DOM manipulation and thats bullet proof.
If you pass the key right you are through with this check. This check is important for your own good.
Pass the key and be happy. Coz I f you pass it right you are good and we are too.
[Image: logo.svg.svg]
Reply
#6
(05-14-2019, 05:45 PM)effone Wrote: Get it straight. You need to pass the post key with your form $_POST submission some way or other.
Simple as that.
If you are not capable of implementing official modifications I have provided alternate DOM manipulation and thats bullet proof.
If you pass the key right you are through with this check. This check is important for your own good.
Pass the key and be happy. Coz I f you pass it right you are good and we are too.

but it is not passing at most point using the official modifications and even that alternate DOM modification in footer? Do we have a version that does not experience these errors?
Reply
#7
I'd like to see a problematic form that always shows the error.
[Image: logo.svg.svg]
Reply
#8
(05-17-2019, 03:19 PM)effone Wrote: I'd like to see a problematic form that always shows the error.

My recent login: 

[Image: ByDeKfx.png]

My modifications:

error_nopermission

{$lang->error_nopermission_guest_1}
<ol>
<li>{$lang->error_nopermission_guest_2}</li>
<li>{$lang->error_nopermission_guest_3}</li>
<li>{$lang->error_nopermission_guest_4}</li>
<li>{$lang->error_nopermission_guest_5}</li>
</ol>
<form action="member.php" method="post">
<input name="my_post_key" type="hidden" value="{$mybb->post_code}" />
<input type="hidden" name="action" value="do_login" />
<input type="hidden" name="url" value="{$redirect_url}" />
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead" colspan="2"><span class="smalltext"><strong>{$lang->login}</strong></span></td>
</tr>
<tr>
<td class="trow1"><strong>{$lang_username}</strong></td>
<td class="trow1"><input type="text" class="textbox" name="username" tabindex="1" /></td>
</tr>
<tr>
<td class="trow2"><strong>{$lang->password}</strong></td>
<td class="trow2"><input type="password" class="textbox" name="password" tabindex="2" /></td>
</tr>
<tr>
<td class="trow1" colspan="2" align="center"><label title="{$lang->remember_me_desc}"><input type="checkbox" class="checkbox" name="remember" checked="checked" value="yes" /> {$lang->remember_me}</label></td>
</tr>
<tr>
<td class="trow2" colspan="2"><span class="smalltext float_right" style="padding-top: 3px;"><a href="member.php?action=register">{$lang->need_reg}</a> | <a href="member.php?action=lostpw">{$lang->forgot_password}</a>&nbsp;</span>&nbsp;<input type="submit" class="button" value="{$lang->login}" tabindex="3" /></td>
</tr>
</table>
</form>
<br />

header_welcomeblock_guest

<!-- Continuation of div(class="upper") as opened in the header template -->
 <span class="welcome">{$lang->welcome_guest} <a href="{$mybb->settings['bburl']}/member.php?action=login" onclick="$('#quick_login').modal({ fadeDuration: 250, keepelement: true, zIndex: (typeof modal_zindex !== 'undefined' ? modal_zindex : 9999) }); return false;" class="login">{$lang->welcome_login}</a></span>
 </div>
 </div>
 <div class="modal" id="quick_login" style="display: none;">
 <form method="post" action="{$mybb->settings['bburl']}/member.php">
 <input name="my_post_key" type="hidden" value="{$mybb->post_code}" />
 <input name="action" type="hidden" value="do_login" />
 <input name="url" type="hidden" value="" />
 <input name="quick_login" type="hidden" value="1" />
 <table width="100%" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" border="0" class="tborder">
 <tr>
 <td class="thead" colspan="2"><strong>{$lang->login}</strong></td>
 </tr>
 {$loginform}
 </table>
 </form>
 </div>
 <script type="text/javascript">
 $("#quick_login input[name='url']").val($(location).attr('href'));
 </script>

member_login

<html>
<head>
<title>{$mybb->settings['bbname']} - {$lang->login}</title>
{$headerinclude}
</head>
<body>
{$header}
<br />
{$inline_errors}
{$member_loggedin_notice}
<form action="member.php" method="post">
<input name="my_post_key" type="hidden" value="{$mybb->post_code}" />
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<tr>
<td class="thead" colspan="2"><strong>{$lang->login}</strong></td>
</tr>
<tr>
<td class="trow1"><strong>{$lang->username}</strong></td>
<td class="trow1"><input type="text" class="textbox" name="username" size="25" style="width: 200px;" value="{$username}" /></td>
</tr>
<tr>
<td class="trow2"><strong>{$lang->password}</strong><br /><span class="smalltext">{$lang->pw_note}</span></td>
<td class="trow2"><input type="password" class="textbox" name="password" size="25" style="width: 200px;" value="{$password}" /> (<a href="member.php?action=lostpw">{$lang->lostpw_note}</a>)</td>
</tr>
<tr>
<td class="trow1" colspan="2" align="center"><label title="{$lang->remember_me_desc}"><input type="checkbox" class="checkbox" name="remember" checked="checked" value="yes" /> {$lang->remember_me}</label></td>
</tr>
{$captcha}
</table>
<br />
<div align="center"><input type="submit" class="button" name="submit" value="{$lang->login}" /></div>
<input type="hidden" name="action" value="do_login" />
<input type="hidden" name="url" value="{$redirect_url}" />
</form>
{$footer}
</body>
</html>

portal_welcome_guesttext


<span class="smalltext">{$lang->guest_welcome_registration}</span><br />
<br />
<form method="post" action="{$mybb->settings['bburl']}/member.php"><input name="my_post_key" type="hidden" value="{$mybb->post_code}" /><input type="hidden" name="action" value="do_login" /><input type="hidden" name="url" value="{$portal_url}" />
{$username}<br />&nbsp;&nbsp;<input type="text" class="textbox" name="username" value="" /><br /><br />
{$lang->password}<br />&nbsp;&nbsp;<input type="password" class="textbox" name="password" value="" /><br /><br />
<label title="{$lang->remember_me_desc}"><input type="checkbox" class="checkbox" name="remember" value="yes" /> {$lang->remember_me}</label><br /><br />
<br /><input type="submit" class="button" name="loginsubmit" value="{$lang->login}" /></form>

Footer

<debugstuff>
 </div>
</div>
<div id="footer">
 <script>$('form :input[value="do_login"]').after('<input type="hidden" name="my_post_key" value="'+my_post_key+'" />');</script>
 <div class="upper">
 <div class="wrapper">
 {$lang_select}
 {$theme_select}
 <ul class="menu bottom_links">
 {$showteamlink}
 {$contact_us}
 <li><a href="{$mybb->settings['homeurl']}">{$mybb->settings['homename']}</a></li>
 <li><a href="#top">{$lang->bottomlinks_returntop}</a></li>
 <li><a href="<archive_url>">{$lang->bottomlinks_litemode}</a></li>
 <li><a href="{$mybb->settings['bburl']}/misc.php?action=markread{$post_code_string}">{$lang->bottomlinks_markread}</a></li>
 <li><a href="{$mybb->settings['bburl']}/misc.php?action=syndication">{$lang->bottomlinks_syndication}</a></li>
 </ul>
 </div>
 </div>
 <div class="lower">
 <div class="wrapper">
 <span id="current_time">{$lang->welcome_current_time}</span>
 <span id="copyright">
 <!-- MyBB is free software developed and maintained by a volunteer community.
 It would be much appreciated by the MyBB Group if you left the full copyright and "powered by" notice intact,
 to show your support for MyBB.  If you choose to remove or modify the copyright below,
 you may be refused support on the MyBB Community Forums.

 This is free software, support us and we'll support you. -->
 {$lang->powered_by} <a href="https://mybb.com" target="_blank" rel="noopener">MyBB{$mybbversion}</a>, &copy; 2002-{$copy_year} <a href="https://mybb.com" target="_blank" rel="noopener">MyBB Group</a>.
 <!-- End powered by -->
 </span>
 </div>
 </div>
</div>
<!-- The following piece of code allows MyBB to run scheduled tasks. DO NOT REMOVE -->{$task_image}<!-- End task image code -->
{$auto_dst_detection}
</div>
Reply
#9
Deep debug is not possible as a guest.
Try replacing inc/functions.phpwith the one in latest package.

or, I may need special access to the site. I guess that will not be an issue since the content is almost nil.
[Image: logo.svg.svg]
Reply
#10
(05-18-2019, 05:33 AM)effone Wrote: Deep debug is not possible as a guest.
Try replacing inc/functions.phpwith the one in latest package.

or, I may need special access to the site. I guess that will not be an issue since the content is almost nil.

I just shoot a pm for your access details. I really wanted this fix cause mybb is just perfect for what i am currently developing.

Thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)