Skip to content

Commit

Permalink
Merge pull request from GHSA-4657-29m2-9m6g
Browse files Browse the repository at this point in the history
This is a security fix
  • Loading branch information
ravenclaw900 committed Feb 13, 2022
1 parent 686f722 commit aed47d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/backend/src/socket_handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ pub async fn socket_handler(socket: warp::ws::WebSocket) {
log::error!("Couldn't parse JSON");
continue;
};
if CONFIG.pass && !validate_token(&req.token) && !first_message {
if data_send.send(None).await.is_err() {
if CONFIG.pass && !validate_token(&req.token) {
if !first_message && data_send.send(None).await.is_err() {
break;
}
data_send
Expand Down

0 comments on commit aed47d9

Please sign in to comment.