Skip to content

Commit

Permalink
[Release] 4.8.6
Browse files Browse the repository at this point in the history
  • Loading branch information
Akkadius committed Jun 16, 2024
1 parent e787f9d commit a6c2dfe
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 12 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [4.8.6] 6/16/2024

**Spire Admin** Fix issue under unauthenticated local installations where websocket connections would get caught in an authorization loop, spamming the console. Unauthenticated Spire installations will now work properly.

## [4.8.5] 6/15/2024

* **Spire Admin** Add **Server Process Management** to the permissions page.
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/views/admin/layout/AdminHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@

<div class="row align-items-center">
<div class="mr-3 pr-5">
<h6 class="header-pretitle">
<h6 class="header-pretitle d-inline-block mr-3">
{{ pageName }}
</h6>

<small style="color: red" v-if="stopMessage !== ''">{{ stopMessage }}</small>

<h1
class="header-title"
:title="stats.server_name"
Expand All @@ -31,7 +33,6 @@

</h1>

<small style="color: red" v-if="stopMessage !== ''">{{ stopMessage }}</small>



Expand Down
2 changes: 1 addition & 1 deletion internal/websocket/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func (h *Handler) HandleExecServerBin(ws *websocket.Conn, msg string) error {
}

func (h *Handler) HandleUnauthorized(ws *websocket.Conn) error {
err := websocket.Message.Send(ws, "Unauthorized")
err := websocket.Message.Send(ws, "{\"error\": \"Unauthorized\"}")
if err != nil {
return err
}
Expand Down
8 changes: 0 additions & 8 deletions internal/websocket/websocket_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package websocket
import (
"encoding/json"
"fmt"
"github.com/Akkadius/spire/internal/http/request"
"github.com/Akkadius/spire/internal/http/routes"
"github.com/Akkadius/spire/internal/logger"
"github.com/Akkadius/spire/internal/pathmgmt"
Expand Down Expand Up @@ -44,14 +43,7 @@ type SpireWebsocketMessage struct {
}

func (a *Controller) websocketHandler(c echo.Context) error {
user := request.GetUser(c)
websocket.Handler(func(ws *websocket.Conn) {
// if no user authorized, kill connection
if user.ID == 0 {
_ = a.handler.HandleUnauthorized(ws)
_ = ws.Close()
}

defer ws.Close()
for {
// Register client
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "spire",
"version": "4.8.5",
"version": "4.8.6",
"repository": {
"type": "git",
"url": "https://github.com/Akkadius/spire.git"
Expand Down

0 comments on commit a6c2dfe

Please sign in to comment.