# HG changeset patch # User Dan # Date 1247865329 14400 # Node ID 0dac837643a446adcaee6ff5218c723c5c8d4141 # Parent 2e7ccbdfdc0a6856c1e1050566009e6c5b4454f1# Parent 4b868c7c241e996977469b55abd795e33d0ce731 Branch merge from accidental split diff -r 4b868c7c241e -r 0dac837643a4 plugins/yubikey/auth.php --- a/plugins/yubikey/auth.php Fri Jul 17 14:05:50 2009 -0400 +++ b/plugins/yubikey/auth.php Fri Jul 17 17:15:29 2009 -0400 @@ -28,6 +28,14 @@ $userdata['yubikey_otp'] = $userdata['password']; } + // Look for a lockout + $lockout_info = $session->get_lockout_info($lockdata); + if ( $lockout_info['locked_out'] ) + { + // pass on to normal auth so the lockout can be sent back properly + return null; + } + if ( !empty($userdata['username']) ) { // get flags diff -r 4b868c7c241e -r 0dac837643a4 plugins/yubikey/yubikey.js --- a/plugins/yubikey/yubikey.js Fri Jul 17 14:05:50 2009 -0400 +++ b/plugins/yubikey/yubikey.js Fri Jul 17 17:15:29 2009 -0400 @@ -217,7 +217,7 @@ addOnloadHook(function() { - attachHook('login_build_form', 'yk_login_dlg_hook(table);'); + attachHook('login_build_form', 'yk_login_dlg_hook(table, data);'); attachHook('login_build_userinfo', 'if ( window.yubikey_otp_current ) userinfo.yubikey_otp = window.yubikey_otp_current;'); if ( title == namespace_list.Special + 'Preferences/Yubikey' ) { @@ -225,7 +225,7 @@ } }); -function yk_login_dlg_hook(table) +function yk_login_dlg_hook(table, data) { window.yubikey_otp_current = false; var tr = document.createElement('tr'); @@ -241,7 +241,7 @@ $('#messageBoxButtons input:button:first').focus(); $('#ajax_login_field_captcha').focus(); }); - if ( window.yk_reg_require_otp || window.yk_user_enabled ) + if ( ( window.yk_reg_require_otp || window.yk_user_enabled ) && !data.locked_out.locked_out ) { setTimeout(function() {