Skip to content

Commit a6c2dfe

Browse files
committed
[Release] 4.8.6
1 parent e787f9d commit a6c2dfe

File tree

5 files changed

+9
-12
lines changed

5 files changed

+9
-12
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## [4.8.6] 6/16/2024
2+
3+
**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+
15
## [4.8.5] 6/15/2024
26

37
* **Spire Admin** Add **Server Process Management** to the permissions page.

frontend/src/views/admin/layout/AdminHeader.vue

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44

55
<div class="row align-items-center">
66
<div class="mr-3 pr-5">
7-
<h6 class="header-pretitle">
7+
<h6 class="header-pretitle d-inline-block mr-3">
88
{{ pageName }}
99
</h6>
1010

11+
<small style="color: red" v-if="stopMessage !== ''">{{ stopMessage }}</small>
12+
1113
<h1
1214
class="header-title"
1315
:title="stats.server_name"
@@ -31,7 +33,6 @@
3133

3234
</h1>
3335

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

3637

3738

internal/websocket/handler.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ func (h *Handler) HandleExecServerBin(ws *websocket.Conn, msg string) error {
109109
}
110110

111111
func (h *Handler) HandleUnauthorized(ws *websocket.Conn) error {
112-
err := websocket.Message.Send(ws, "Unauthorized")
112+
err := websocket.Message.Send(ws, "{\"error\": \"Unauthorized\"}")
113113
if err != nil {
114114
return err
115115
}

internal/websocket/websocket_controller.go

-8
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package websocket
33
import (
44
"encoding/json"
55
"fmt"
6-
"github.com/Akkadius/spire/internal/http/request"
76
"github.com/Akkadius/spire/internal/http/routes"
87
"github.com/Akkadius/spire/internal/logger"
98
"github.com/Akkadius/spire/internal/pathmgmt"
@@ -44,14 +43,7 @@ type SpireWebsocketMessage struct {
4443
}
4544

4645
func (a *Controller) websocketHandler(c echo.Context) error {
47-
user := request.GetUser(c)
4846
websocket.Handler(func(ws *websocket.Conn) {
49-
// if no user authorized, kill connection
50-
if user.ID == 0 {
51-
_ = a.handler.HandleUnauthorized(ws)
52-
_ = ws.Close()
53-
}
54-
5547
defer ws.Close()
5648
for {
5749
// Register client

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "spire",
3-
"version": "4.8.5",
3+
"version": "4.8.6",
44
"repository": {
55
"type": "git",
66
"url": "https://github.com/Akkadius/spire.git"

0 commit comments

Comments
 (0)