mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
improve tfa
This commit is contained in:
@@ -1750,8 +1750,8 @@ impl Connection {
|
||||
return true;
|
||||
}
|
||||
if let Some(totp) = self.require_2fa.as_ref() {
|
||||
if let Ok(code) = totp.generate_current() {
|
||||
if tfa.code == code {
|
||||
if let Ok(res) = totp.check_current(&tfa.code) {
|
||||
if res {
|
||||
self.update_failure(failure, true, 1);
|
||||
self.require_2fa.take();
|
||||
self.send_logon_response().await;
|
||||
|
||||
Reference in New Issue
Block a user