mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-04-23 11:36:13 +02:00
feat(clipboard): support readImage & writeImage (#845)
* feat(clipboard): support `read_image` & `write_image` * fix plugin name * platform specific bahavior * remove unnecessary BufWriter * improvement * update example * update example * format * header, fix change file * use image from tauri * fix ci * update tauri, fix read * image crate only on desktop [skip ci] * Update plugins/authenticator/src/u2f_crate/protocol.rs [skip ci] Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com> * Update plugins/authenticator/src/u2f_crate/protocol.rs [skip ci] Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com> * update deps, address code review * fix mobile [skip ci] --------- Co-authored-by: Lucas Nogueira <lucas@tauri.studio> Co-authored-by: Lucas Nogueira <lucas@tauri.app> Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>
This commit is contained in:
@@ -95,7 +95,8 @@ impl U2f {
|
||||
challenge: Challenge,
|
||||
response: RegisterResponse,
|
||||
) -> Result<Registration> {
|
||||
if expiration(challenge.timestamp) > Duration::seconds(300) {
|
||||
// Safe to unwrap since 300 is within the constraints of Duration::try_seconds
|
||||
if expiration(challenge.timestamp) > Duration::try_seconds(300).unwrap() {
|
||||
return Err(U2fError::ChallengeExpired);
|
||||
}
|
||||
|
||||
@@ -152,7 +153,8 @@ impl U2f {
|
||||
sign_resp: SignResponse,
|
||||
counter: u32,
|
||||
) -> Result<u32> {
|
||||
if expiration(challenge.timestamp) > Duration::seconds(300) {
|
||||
// Safe to unwrap since 300 is within the constraints of Duration::try_seconds
|
||||
if expiration(challenge.timestamp) > Duration::try_seconds(300).unwrap() {
|
||||
return Err(U2fError::ChallengeExpired);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user