Skip to content

Commit

Permalink
Merge pull request #358 from Fingel/relax-128bit-secret-requirement
Browse files Browse the repository at this point in the history
Relax requirement for 128 bit totp secrets
  • Loading branch information
alexanderkjall authored Sep 28, 2024
2 parents 3ae424a + a515ac6 commit e6597bb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1041,7 +1041,9 @@ impl PasswordEntry {
}
end_pos
};
let totp = TOTP::from_url(&secret[start_pos..end_pos])?;
// Use unchecked for sites like Discord, Github that still use 80
// bit secrets. https://github.com/constantoine/totp-rs/issues/46
let totp = TOTP::from_url_unchecked(&secret[start_pos..end_pos])?;
secret.zeroize();
Ok(totp.generate_current()?)
} else {
Expand Down

0 comments on commit e6597bb

Please sign in to comment.