mirror of
https://github.com/livekit/livekit.git
synced 2026-03-30 17:45:40 +00:00
Fix for some CodeQL reported issues (#4314)
One of the fix is in updated protocol (logging of a request message that includes the turn server settings, including password).
This commit is contained in:
2
go.mod
2
go.mod
@@ -23,7 +23,7 @@ require (
|
||||
github.com/jxskiss/base62 v1.1.0
|
||||
github.com/livekit/mageutil v0.0.0-20250511045019-0f1ff63f7731
|
||||
github.com/livekit/mediatransportutil v0.0.0-20260113174415-2e8ba344fca3
|
||||
github.com/livekit/protocol v1.44.1-0.20260205174004-cd064b4fb1c2
|
||||
github.com/livekit/protocol v1.44.1-0.20260211042324-3688e156dc7e
|
||||
github.com/livekit/psrpc v0.7.1
|
||||
github.com/mackerelio/go-osstat v0.2.6
|
||||
github.com/magefile/mage v1.15.0
|
||||
|
||||
4
go.sum
4
go.sum
@@ -177,8 +177,8 @@ github.com/livekit/mageutil v0.0.0-20250511045019-0f1ff63f7731 h1:9x+U2HGLrSw5AT
|
||||
github.com/livekit/mageutil v0.0.0-20250511045019-0f1ff63f7731/go.mod h1:Rs3MhFwutWhGwmY1VQsygw28z5bWcnEYmS1OG9OxjOQ=
|
||||
github.com/livekit/mediatransportutil v0.0.0-20260113174415-2e8ba344fca3 h1:v1Xc/q/547TjLX7Nw5y2vXNnmV0XYFAbhTJrtErQeDA=
|
||||
github.com/livekit/mediatransportutil v0.0.0-20260113174415-2e8ba344fca3/go.mod h1:QBx/KHV6Vv00ggibg/WrOlqrkTciEA2Hc9DGWYr3Q9U=
|
||||
github.com/livekit/protocol v1.44.1-0.20260205174004-cd064b4fb1c2 h1:NmQzsOJkT4K70xl/bx3iSChIWBzWdIysvU+a8oNhtkU=
|
||||
github.com/livekit/protocol v1.44.1-0.20260205174004-cd064b4fb1c2/go.mod h1:BLJHYHErQTu3+fnmfGrzN6CbHxNYiooFIIYGYxXxotw=
|
||||
github.com/livekit/protocol v1.44.1-0.20260211042324-3688e156dc7e h1:5rYmMte7Y50xQphcyFOnTSdTImkmAL0MpTevVwJejpg=
|
||||
github.com/livekit/protocol v1.44.1-0.20260211042324-3688e156dc7e/go.mod h1:BLJHYHErQTu3+fnmfGrzN6CbHxNYiooFIIYGYxXxotw=
|
||||
github.com/livekit/psrpc v0.7.1 h1:ms37az0QTD3UXIWuUC5D/SkmKOlRMVRsI261eBWu/Vw=
|
||||
github.com/livekit/psrpc v0.7.1/go.mod h1:bZ4iHFQptTkbPnB0LasvRNu/OBYXEu1NA6O5BMFo9kk=
|
||||
github.com/mackerelio/go-osstat v0.2.6 h1:gs4U8BZeS1tjrL08tt5VUliVvSWP26Ai2Ob8Lr7f2i0=
|
||||
|
||||
@@ -27,9 +27,6 @@ import (
|
||||
"github.com/pkg/errors"
|
||||
"golang.org/x/exp/maps"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/agent"
|
||||
"github.com/livekit/livekit-server/pkg/sfu"
|
||||
sutils "github.com/livekit/livekit-server/pkg/utils"
|
||||
"github.com/livekit/mediatransportutil/pkg/rtcconfig"
|
||||
"github.com/livekit/protocol/auth"
|
||||
"github.com/livekit/protocol/livekit"
|
||||
@@ -42,6 +39,10 @@ import (
|
||||
"github.com/livekit/psrpc"
|
||||
"github.com/livekit/psrpc/pkg/middleware"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/agent"
|
||||
"github.com/livekit/livekit-server/pkg/sfu"
|
||||
sutils "github.com/livekit/livekit-server/pkg/utils"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/clientconfiguration"
|
||||
"github.com/livekit/livekit-server/pkg/config"
|
||||
"github.com/livekit/livekit-server/pkg/routing"
|
||||
@@ -1003,7 +1004,6 @@ func (r *RoomManager) iceServersForParticipant(apiKey string, participant types.
|
||||
participant.GetLogger().Warnw("could not create turn password", err)
|
||||
hasSTUN = false
|
||||
} else {
|
||||
logger.Infow("created TURN password", "username", username, "password", password)
|
||||
iceServers = append(iceServers, &livekit.ICEServer{
|
||||
Urls: urls,
|
||||
Username: username,
|
||||
|
||||
@@ -26,10 +26,11 @@ import (
|
||||
"google.golang.org/protobuf/proto"
|
||||
"google.golang.org/protobuf/types/known/timestamppb"
|
||||
|
||||
"github.com/livekit/protocol/livekit"
|
||||
|
||||
"github.com/livekit/livekit-server/pkg/telemetry"
|
||||
"github.com/livekit/livekit-server/pkg/telemetry/prometheus"
|
||||
"github.com/livekit/livekit-server/pkg/utils"
|
||||
"github.com/livekit/protocol/livekit"
|
||||
)
|
||||
|
||||
type twirpRequestFields struct {
|
||||
@@ -407,7 +408,7 @@ func telemetryResponseSent(
|
||||
}
|
||||
a.NodeId = string(nodeID)
|
||||
if statusCode, ok := twirp.StatusCode(ctx); ok {
|
||||
if status, err := strconv.Atoi(statusCode); err == nil {
|
||||
if status, err := strconv.ParseInt(statusCode, 10, 32); err == nil {
|
||||
a.Status = int32(status)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user