# HG changeset patch # User Dan # Date 1247865310 14400 # Node ID 2e7ccbdfdc0a6856c1e1050566009e6c5b4454f1 # Parent 9b8688df52d5c2dbf4407f8db1d4e61078689a7e SECURITY: Added recognition for lockouts diff -r 9b8688df52d5 -r 2e7ccbdfdc0a plugins/yubikey/auth.php --- a/plugins/yubikey/auth.php Sat May 16 18:24:45 2009 -0400 +++ b/plugins/yubikey/auth.php Fri Jul 17 17:15:10 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 9b8688df52d5 -r 2e7ccbdfdc0a plugins/yubikey/yubikey.js --- a/plugins/yubikey/yubikey.js Sat May 16 18:24:45 2009 -0400 +++ b/plugins/yubikey/yubikey.js Fri Jul 17 17:15:10 2009 -0400 @@ -212,7 +212,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' ) { @@ -220,7 +220,7 @@ } }); -function yk_login_dlg_hook(table) +function yk_login_dlg_hook(table, data) { window.yubikey_otp_current = false; var tr = document.createElement('tr'); @@ -236,7 +236,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() {