Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
山不在高_有仙则灵
SkyWalking
提交
96014dda
S
SkyWalking
项目概览
山不在高_有仙则灵
/
SkyWalking
与 Fork 源项目一致
Fork自
apache / SkyWalking
通知
12
Star
0
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
SkyWalking
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
96014dda
编写于
11月 06, 2020
作者:
K
kezhenxu94
提交者:
GitHub
11月 06, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix CVE in `UninstrumentedGatewaysConfig` (#5802)
上级
5197004d
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
16 addition
and
12 deletion
+16
-12
CHANGES.md
CHANGES.md
+1
-0
oap-server/analyzer/agent-analyzer/src/main/java/org/apache/skywalking/oap/server/analyzer/provider/trace/UninstrumentedGatewaysConfig.java
...analyzer/provider/trace/UninstrumentedGatewaysConfig.java
+15
-12
未找到文件。
CHANGES.md
浏览文件 @
96014dda
...
...
@@ -32,6 +32,7 @@ Release Notes.
*
Fix
`searchService`
bug in the InfluxDB storage implementation.
*
Fix CVE in the alarm module, when activating the dynamic configuration feature.
*
Fix CVE in the endpoint grouping, when activating the dynamic configuration feature.
*
Fix CVE in the uninstrumented gateways configs, when activating the dynamic configuration feature.
*
Make the codes and doc consistent in sharding server and core server.
#### UI
...
...
oap-server/analyzer/agent-analyzer/src/main/java/org/apache/skywalking/oap/server/analyzer/provider/trace/UninstrumentedGatewaysConfig.java
浏览文件 @
96014dda
...
...
@@ -17,17 +17,6 @@
package
org.apache.skywalking.oap.server.analyzer.provider.trace
;
import
lombok.Getter
;
import
lombok.Setter
;
import
lombok.ToString
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.skywalking.oap.server.analyzer.module.AnalyzerModule
;
import
org.apache.skywalking.oap.server.configuration.api.ConfigChangeWatcher
;
import
org.apache.skywalking.oap.server.core.Const
;
import
org.apache.skywalking.oap.server.library.module.ModuleProvider
;
import
org.apache.skywalking.oap.server.library.util.ResourceUtils
;
import
org.yaml.snakeyaml.Yaml
;
import
java.io.FileNotFoundException
;
import
java.io.Reader
;
import
java.util.ArrayList
;
...
...
@@ -40,12 +29,24 @@ import java.util.concurrent.atomic.AtomicReference;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
import
java.util.stream.StreamSupport
;
import
lombok.Getter
;
import
lombok.Setter
;
import
lombok.ToString
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.skywalking.oap.server.analyzer.module.AnalyzerModule
;
import
org.apache.skywalking.oap.server.configuration.api.ConfigChangeWatcher
;
import
org.apache.skywalking.oap.server.core.Const
;
import
org.apache.skywalking.oap.server.library.module.ModuleProvider
;
import
org.apache.skywalking.oap.server.library.util.ResourceUtils
;
import
org.yaml.snakeyaml.Yaml
;
import
org.yaml.snakeyaml.constructor.Constructor
;
import
static
java
.
util
.
Objects
.
isNull
;
@Slf4j
public
class
UninstrumentedGatewaysConfig
extends
ConfigChangeWatcher
{
private
final
AtomicReference
<
String
>
settingsString
;
private
volatile
Map
<
String
,
GatewayInstanceInfo
>
gatewayInstanceKeyedByAddress
=
Collections
.
emptyMap
();
public
UninstrumentedGatewaysConfig
(
ModuleProvider
provider
)
{
...
...
@@ -110,7 +111,7 @@ public class UninstrumentedGatewaysConfig extends ConfigChangeWatcher {
private
GatewayInfos
parseGatewaysFromYml
(
final
String
ymlContent
)
{
try
{
return
new
Yaml
().
loadAs
(
ymlContent
,
GatewayInfos
.
class
);
return
new
Yaml
(
new
Constructor
(
GatewayInfos
.
class
)
).
loadAs
(
ymlContent
,
GatewayInfos
.
class
);
}
catch
(
Exception
e
)
{
log
.
error
(
"Failed to parse yml content as gateways: \n{}"
,
ymlContent
,
e
);
}
...
...
@@ -122,6 +123,7 @@ public class UninstrumentedGatewaysConfig extends ConfigChangeWatcher {
@ToString
public
static
class
GatewayInfo
{
private
String
name
;
private
List
<
GatewayInstanceInfo
>
instances
;
}
...
...
@@ -148,6 +150,7 @@ public class UninstrumentedGatewaysConfig extends ConfigChangeWatcher {
@ToString
public
static
class
GatewayInstanceInfo
{
private
String
host
;
private
Integer
port
;
String
getAddress
()
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录