Skip to content

Commit

Permalink
Remove infinite loop of death, fix challenge infinite looping on oidc
Browse files Browse the repository at this point in the history
  • Loading branch information
NHAS committed Jun 10, 2024
1 parent db65d41 commit 4ea1a64
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 3 additions & 5 deletions internal/router/session_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,9 @@ func (c *Challenger) WS(w http.ResponseWriter, r *http.Request) {

log.Println(user.Username, remoteAddress, "established new challenge connection!")

for {
select {
case <-cancel:
case <-conn.Await():
}
select {
case <-cancel:
case <-conn.Await():
}

}
1 change: 1 addition & 0 deletions internal/webserver/resources/static/js/challenge.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ function connect() {
}));
return
case "reset":
localStorage.removeItem("challenge")
window.location.href = '/'
return
}
Expand Down

0 comments on commit 4ea1a64

Please sign in to comment.