mirror of
https://gitlab.gnome.org/World/Authenticator.git
synced 2025-03-04 08:44:40 +01:00
Fix invalid token error if token has trailing characters
This commit is contained in:
parent
2967718975
commit
d7ee4a0c86
1 changed files with 1 additions and 0 deletions
|
@ -308,6 +308,7 @@ impl AccountAddDialog {
|
|||
if let Some(ref provider) = *imp.selected_provider.borrow() {
|
||||
let username = imp.username_entry.text();
|
||||
let token = imp.token_entry.text();
|
||||
let token = token.trim_end_matches('=');
|
||||
if !OTP::is_valid(&token) {
|
||||
imp.error_revealer.popup(&gettext("Invalid Token"));
|
||||
anyhow::bail!("Token {} is not a valid Base32 secret", &token);
|
||||
|
|
Loading…
Add table
Reference in a new issue