You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by "pinkfloyds (via GitHub)" <gi...@apache.org> on 2024/04/10 12:48:59 UTC
[PR] abnormal characters check [dolphinscheduler]
pinkfloyds opened a new pull request, #15824:
URL: https://github.com/apache/dolphinscheduler/pull/15824
## Purpose of the pull request
resource center file path illegal character check filter
## Brief change log
> dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/utils/CheckUtils.java
`/**
* regex FilePath check,only use a-z A-Z 0-9 _./- and excluding ..
*
* @param str input string
* @return true if regex pattern is right, otherwise return false
*/
public static boolean checkFilePath(String str) {
return regexChecks(str, Constants.REGEX_FILE_PATH) && !str.contains("..");
}`
> dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/ResourcesServiceImpl.java
`// abnormal characters check
if (!checkFilePath(fullName)){
log.error("fullName contains illegal characters");
throw new ServiceException(Status.ILLEGAL_RESOURCE_PATH);
}`
## Verify this pull request
Manually verified the change by testing locally.
Added test case testCheckFilePath in CheckUtilsTest.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Improvement] Abnormal characters check [dolphinscheduler]
Posted by "SbloodyS (via GitHub)" <gi...@apache.org>.
SbloodyS merged PR #15824:
URL: https://github.com/apache/dolphinscheduler/pull/15824
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Improvement] Abnormal characters check [dolphinscheduler]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #15824:
URL: https://github.com/apache/dolphinscheduler/pull/15824#issuecomment-2050814783
## [](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=15824) **Quality Gate passed**
Issues
 [1 New issue](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=15824&resolved=false&inNewCodePeriod=true)
 [0 Accepted issues](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=15824&metric=new_accepted_issues&view=list)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=15824&resolved=false&inNewCodePeriod=true)
 [66.7% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=15824&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=15824&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=15824)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Improvement] Abnormal characters check [dolphinscheduler]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #15824:
URL: https://github.com/apache/dolphinscheduler/pull/15824#issuecomment-2050809933
## [Codecov](https://app.codecov.io/gh/apache/dolphinscheduler/pull/15824?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
Attention: Patch coverage is `50.00000%` with `2 lines` in your changes are missing coverage. Please review.
> Project coverage is 39.24%. Comparing base [(`883848f`)](https://app.codecov.io/gh/apache/dolphinscheduler/commit/883848f6ee00843d3c9e4668d607336d544dd110?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) to head [(`bccabc9`)](https://app.codecov.io/gh/apache/dolphinscheduler/pull/15824?dropdown=coverage&src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
> :exclamation: Current head bccabc9 differs from pull request most recent head 0b6806d. Consider uploading reports for the commit 0b6806d to get more accurate results
| [Files](https://app.codecov.io/gh/apache/dolphinscheduler/pull/15824?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
|---|---|---|
| [...heduler/api/service/impl/ResourcesServiceImpl.java](https://app.codecov.io/gh/apache/dolphinscheduler/pull/15824?src=pr&el=tree&filepath=dolphinscheduler-api%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fdolphinscheduler%2Fapi%2Fservice%2Fimpl%2FResourcesServiceImpl.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-ZG9scGhpbnNjaGVkdWxlci1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2RvbHBoaW5zY2hlZHVsZXIvYXBpL3NlcnZpY2UvaW1wbC9SZXNvdXJjZXNTZXJ2aWNlSW1wbC5qYXZh) | 0.00% | [1 Missing and 1 partial :warning: ](https://app.codecov.io/gh/apache/dolphinscheduler/pull/15824?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## dev #15824 +/- ##
============================================
- Coverage 39.24% 39.24% -0.01%
Complexity 4910 4910
============================================
Files 1323 1323
Lines 45187 45191 +4
Branches 4811 4812 +1
============================================
+ Hits 17734 17735 +1
- Misses 25572 25573 +1
- Partials 1881 1883 +2
```
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/dolphinscheduler/pull/15824?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Improvement] Abnormal characters check [dolphinscheduler]
Posted by "sonarcloud[bot] (via GitHub)" <gi...@apache.org>.
sonarcloud[bot] commented on PR #15824:
URL: https://github.com/apache/dolphinscheduler/pull/15824#issuecomment-2050816295
## [](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=15824) **Quality Gate passed**
Issues
 [1 New issue](https://sonarcloud.io/project/issues?id=apache-dolphinscheduler&pullRequest=15824&resolved=false&inNewCodePeriod=true)
 [0 Accepted issues](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=15824&metric=new_accepted_issues&view=list)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache-dolphinscheduler&pullRequest=15824&resolved=false&inNewCodePeriod=true)
 [66.7% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=15824&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache-dolphinscheduler&pullRequest=15824&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarCloud](https://sonarcloud.io/dashboard?id=apache-dolphinscheduler&pullRequest=15824)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org