You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The second parameter of reqOverlayDiv is $txt['login']
This is set in the index.language.php
$txt['login'] = 'Login';
In script.js we define the parameters:
// Open a overlay div
function reqOverlayDiv(desktopURL, sHeader, sIcon)
And finally when we receive an error 500, we throw an error that they are banned if it's from the login page.
statusCode: {
500: function() {
if (sHeader == 'Login')
oPopup_body.html(banned_text);
else
oPopup_body.html('500 Internal Server Error');
}
}
But we are depending on sHeader which is a text string. So in non english forums, this will never trigger the banned message, but only the internal error message.
Steps to reproduce
Change $txt['login'] to anything else.
Ban the member
Try to login
Environment (complete as necessary)
Version/Git revision: latest at time of report
Database Type: n/a
Database Version: n/a
PHP Version: n/a
Additional information/references
Tagging this for final, it doesn't need to resolve for RC4 but could.
The text was updated successfully, but these errors were encountered:
Use HTTP error code 403 (Forbidden) instead of 500
when a banned user tries to login.
This will also avoid using a language string to
differ between banned users and other errors.
FixesSimpleMachines#6587
Signed-off-by: Oscar Rydhé oscar.rydhe@gmail.com
Description
In index.template.php we have this:
The second parameter of reqOverlayDiv is $txt['login']
This is set in the index.language.php
In script.js we define the parameters:
And finally when we receive an error 500, we throw an error that they are banned if it's from the login page.
But we are depending on sHeader which is a text string. So in non english forums, this will never trigger the banned message, but only the internal error message.
Steps to reproduce
Environment (complete as necessary)
Additional information/references
Tagging this for final, it doesn't need to resolve for RC4 but could.
The text was updated successfully, but these errors were encountered: