π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
feat(cli): verify SRP server proof when provided
Prateek Sunal630f10cc9892
diff --git a/rust/cli/src/api/auth.rs b/rust/cli/src/api/auth.rsindex 8e9946b98e..43e8009656 100644--- a/rust/cli/src/api/auth.rs+++ b/rust/cli/src/api/auth.rs@@ -122,6 +122,15 @@ impl<'a> AuthClient<'a> {.verify_srp_session(&srp_attrs.srp_user_id, &session.session_id, &proof).await?;+ if let Some(srp_m2) = &auth_response.srp_m2 {+ let server_proof = STANDARD.decode(srp_m2)?;+ srp_session.verify_m2(&server_proof).map_err(|_| {+ crate::models::error::Error::AuthenticationFailed(+ "Server proof verification failed".to_string(),+ )+ })?;+ }+Ok((auth_response, creds.kek))}