Skip to content

Commit

Permalink
Merge branch 'main' into social-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
robtfm committed Oct 17, 2024
2 parents a1520cb + 6e2b0cb commit 0e8a4e8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/comms/src/archipelago.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,11 @@ async fn archipelago_handler_inner(
// send challenge response
debug!("<< challenge received; {challenge_to_sign}");

if !challenge_to_sign.starts_with("dcl-") {
error!("invalid challenge to sign");
return Err(anyhow!("invalid challenge to sign"));
}

// sign challenge
let chain = wallet.sign_message(challenge_to_sign).await?;
let auth_chain_json = serde_json::to_string(&chain)?;
Expand Down
5 changes: 5 additions & 0 deletions crates/comms/src/websocket_room.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,11 @@ async fn websocket_room_handler_inner(
// send challenge response
debug!("<< challenge received; {challenge_to_sign}");

if !challenge_to_sign.starts_with("dcl-") {
error!("invalid challenge to sign");
return Err(anyhow!("invalid challenge to sign"));
}

// sign challenge
let chain = wallet.sign_message(challenge_to_sign).await?;
let auth_chain_json = serde_json::to_string(&chain)?;
Expand Down

0 comments on commit 0e8a4e8

Please sign in to comment.