-
Notifications
You must be signed in to change notification settings - Fork 310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ISSUE #314]Fix the RCE caused by the vulnerability in YAML deseriali… #328
Conversation
|
||
protected static final Logger LOGGER = LoggerFactory.getLogger(DefaultYamlConfigParse.class); | ||
|
||
private static final String YAML_ALLOW_COMPLEX_OBJECT = "yamlAllowComplexObject"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've noticed that similar configurations use camelCase naming conventions, such as ignoreResourceNotFound and ignoreUnresolvablePlaceholders, so I've adopted camelCase naming for consistency.
I have a question: Why doesn't the nacos-spring-project module use com.alibaba.nacos.client.env.NacosClientProperties to retrieve properties? |
README.md
Outdated
|
||
By default, this library uses `SafeConstructor` for type conversion during YAML parsing. This is done to ensure that potentially unsafe code is not executed during the parsing process. `SafeConstructor` provides a secure construction logic for mapping YAML structures to Java objects. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
需要添加起始版本的说明,比如1.1.1版本前不是,1.1.2版本开始默认使用SafeConstructor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
You can set the toggle by adding a JVM system property when starting your application. For example, in the command line: | ||
|
||
```bash | ||
java -DyamlAllowComplexObject=true -jar your-application.jar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Safe不是默认开启的吗?
这里应该是Disable吧?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
What is the purpose of the change
see: https://bitbucket.org/snakeyaml/snakeyaml/issues/561/cve-2022-1471-vulnerability-in#comment-64581479
related: #314
Brief changelog
XX
Verifying this change
XXXX
Follow this checklist to help us incorporate your contribution quickly and easily:
[ISSUE #123] Fix UnknownException when host config not exist
. Each commit in the pull request should have a meaningful subject line and body.mvn -B clean package apache-rat:check findbugs:findbugs -Dmaven.test.skip=true
to make sure basic checks pass. Runmvn clean install -DskipITs
to make sure unit-test pass. Runmvn clean test-compile failsafe:integration-test
to make sure integration-test pass.