lichess.redirect only handles local urls - closes lichess-org/api#13

authenticationfailed-login
Thibault Duplessis 2019-03-13 14:42:40 +07:00
parent 95a3b3dfcc
commit 281890490f
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@ function load($f) {
$f.find('.submit').attr('disabled', false);
if (res === 'InvalidTotpToken') $f.find('.two-factor .error').show();
}
else lichess.redirect(res.indexOf('ok:') === 0 ? res.substr(3) : '/');
else location.href = res.indexOf('ok:') === 0 ? res.substr(3) : '/';
},
error: function(err) {
$f.replaceWith($(err.responseText).find('form.login'));