Skip to content

Commit 49f4e3f

Browse files
authored
fix: fix Security vulnerability (openimsdk#1646)
Signed-off-by: Xinwei Xiong (cubxxw) <[email protected]>
1 parent bed112d commit 49f4e3f

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

docker-compose.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ services:
124124

125125
## Uncomment and configure the following services as needed
126126
# openim-admin:
127-
# image: ${IMAGE_REGISTRY:-ghcr.io/openimsdk}/openim-admin-front:v3.4.0
127+
# image: ${IMAGE_REGISTRY:-ghcr.io/openimsdk}/openim-admin:toc-base-open-docker.35
128128
# container_name: openim-admin
129129
# restart: always
130130
# ports:

pkg/common/discoveryregister/kubernetes/kubernetes.go

+8
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,17 @@ func (cli *K8sDR) Register(serviceName, host string, port int, opts ...grpc.Dial
5555

5656
return nil
5757
}
58+
5859
func (cli *K8sDR) UnRegister() error {
5960

6061
return nil
6162
}
63+
6264
func (cli *K8sDR) CreateRpcRootNodes(serviceNames []string) error {
6365

6466
return nil
6567
}
68+
6669
func (cli *K8sDR) RegisterConf2Registry(key string, conf []byte) error {
6770

6871
return nil
@@ -123,6 +126,8 @@ func getMsgGatewayHost(ctx context.Context) []string {
123126
log.ZInfo(ctx, "getMsgGatewayHost", "instance", instance, "selfPodName", selfPodName, "replicas", replicas, "ns", ns, "ret", ret)
124127
return ret
125128
}
129+
130+
// GetConns returns the gRPC client connections to the specified service.
126131
func (cli *K8sDR) GetConns(ctx context.Context, serviceName string, opts ...grpc.DialOption) ([]*grpc.ClientConn, error) {
127132

128133
if serviceName != config.Config.RpcRegisterName.OpenImMessageGatewayName {
@@ -142,6 +147,7 @@ func (cli *K8sDR) GetConns(ctx context.Context, serviceName string, opts ...grpc
142147
return ret, nil
143148
}
144149
}
150+
145151
func (cli *K8sDR) GetConn(ctx context.Context, serviceName string, opts ...grpc.DialOption) (*grpc.ClientConn, error) {
146152

147153
return grpc.DialContext(ctx, serviceName, append(cli.options, opts...)...)
@@ -151,9 +157,11 @@ func (cli *K8sDR) GetSelfConnTarget() string {
151157

152158
return cli.rpcRegisterAddr
153159
}
160+
154161
func (cli *K8sDR) AddOption(opts ...grpc.DialOption) {
155162
cli.options = append(cli.options, opts...)
156163
}
164+
157165
func (cli *K8sDR) CloseConn(conn *grpc.ClientConn) {
158166
conn.Close()
159167
}

0 commit comments

Comments
 (0)