You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by GitBox <gi...@apache.org> on 2020/01/12 11:48:23 UTC
[GitHub] [kylin] nichunen opened a new pull request #1054: Fix some insecure
issues
nichunen opened a new pull request #1054: Fix some insecure issues
URL: https://github.com/apache/kylin/pull/1054
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [kylin] hit-lacus commented on a change in pull request #1054: Fix
some insecure issues
Posted by GitBox <gi...@apache.org>.
hit-lacus commented on a change in pull request #1054: Fix some insecure issues
URL: https://github.com/apache/kylin/pull/1054#discussion_r365655230
##########
File path: core-common/src/main/java/org/apache/kylin/common/persistence/JDBCResourceStore.java
##########
@@ -44,28 +45,17 @@
public class JDBCResourceStore extends PushdownResourceStore {
- private static Logger logger = LoggerFactory.getLogger(JDBCResourceStore.class);
-
public static final String JDBC_SCHEME = "jdbc";
-
+ private static final ConcurrentHashMap<String, Object> resourceHashMap = new ConcurrentHashMap<>();
Review comment:
Maybe change the name `resourceHashMap` to something like `lockObjectMap` is more readable.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [kylin] coveralls commented on issue #1054: Fix some insecure issues
Posted by GitBox <gi...@apache.org>.
coveralls commented on issue #1054: Fix some insecure issues
URL: https://github.com/apache/kylin/pull/1054#issuecomment-573524601
## Pull Request Test Coverage Report for [Build 5511](https://coveralls.io/builds/28061633)
* **14** of **80** **(17.5%)** changed or added relevant lines in **13** files are covered.
* **19** unchanged lines in **6** files lost coverage.
* Overall coverage decreased (**-0.004%**) to **27.52%**
---
| Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
| :-----|--------------|--------|---: |
| [core-metadata/src/main/java/org/apache/kylin/measure/topn/TopNMeasureType.java](https://coveralls.io/builds/28061633/source?filename=core-metadata%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fmeasure%2Ftopn%2FTopNMeasureType.java#L132) | 0 | 1 | 0.0%
| [source-hive/src/main/java/org/apache/kylin/source/hive/BeelineHiveClient.java](https://coveralls.io/builds/28061633/source?filename=source-hive%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fsource%2Fhive%2FBeelineHiveClient.java#L58) | 0 | 1 | 0.0%
| [storage-hbase/src/main/java/org/apache/kylin/storage/hbase/steps/HFileOutputFormat3.java](https://coveralls.io/builds/28061633/source?filename=storage-hbase%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fstorage%2Fhbase%2Fsteps%2FHFileOutputFormat3.java#L290) | 0 | 1 | 0.0%
| [server-base/src/main/java/org/apache/kylin/rest/controller/CubeController.java](https://coveralls.io/builds/28061633/source?filename=server-base%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Frest%2Fcontroller%2FCubeController.java#L890) | 0 | 2 | 0.0%
| [server-base/src/main/java/org/apache/kylin/rest/util/ValidateUtil.java](https://coveralls.io/builds/28061633/source?filename=server-base%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Frest%2Futil%2FValidateUtil.java#L53) | 0 | 3 | 0.0%
| [server-base/src/main/java/org/apache/kylin/rest/controller/QueryController.java](https://coveralls.io/builds/28061633/source?filename=server-base%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Frest%2Fcontroller%2FQueryController.java#L87) | 0 | 4 | 0.0%
| [server-base/src/main/java/org/apache/kylin/rest/broadcaster/BroadcasterReceiveServlet.java](https://coveralls.io/builds/28061633/source?filename=server-base%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Frest%2Fbroadcaster%2FBroadcasterReceiveServlet.java#L38) | 0 | 6 | 0.0%
| [core-common/src/main/java/org/apache/kylin/common/persistence/JDBCResourceStore.java](https://coveralls.io/builds/28061633/source?filename=core-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fcommon%2Fpersistence%2FJDBCResourceStore.java#L49) | 0 | 14 | 0.0%
| [server-base/src/main/java/org/apache/kylin/rest/service/CubeService.java](https://coveralls.io/builds/28061633/source?filename=server-base%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Frest%2Fservice%2FCubeService.java#L549) | 0 | 34 | 0.0%
<!-- | **Total:** | **14** | **80** | **17.5%** | -->
| Files with Coverage Reduction | New Missed Lines | % |
| :-----|--------------|--: |
| [core-common/src/main/java/org/apache/kylin/common/metrics/metrics2/CodahaleMetrics.java](https://coveralls.io/builds/28061633/source?filename=core-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fcommon%2Fmetrics%2Fmetrics2%2FCodahaleMetrics.java#L258) | 1 | 0.0% |
| [server-base/src/main/java/org/apache/kylin/rest/controller/QueryController.java](https://coveralls.io/builds/28061633/source?filename=server-base%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Frest%2Fcontroller%2FQueryController.java#L154) | 1 | 0.0% |
| [core-cube/src/main/java/org/apache/kylin/cube/cuboid/TreeCuboidScheduler.java](https://coveralls.io/builds/28061633/source?filename=core-cube%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fcube%2Fcuboid%2FTreeCuboidScheduler.java#L124) | 2 | 68.46% |
| [core-common/src/main/java/org/apache/kylin/common/persistence/JDBCResourceStore.java](https://coveralls.io/builds/28061633/source?filename=core-common%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fcommon%2Fpersistence%2FJDBCResourceStore.java#L57) | 4 | 0.0% |
| [core-cube/src/main/java/org/apache/kylin/cube/inmemcubing/MemDiskStore.java](https://coveralls.io/builds/28061633/source?filename=core-cube%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Fcube%2Finmemcubing%2FMemDiskStore.java#L439) | 5 | 77.81% |
| [server-base/src/main/java/org/apache/kylin/rest/service/CubeService.java](https://coveralls.io/builds/28061633/source?filename=server-base%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fkylin%2Frest%2Fservice%2FCubeService.java#L646) | 6 | 0.0% |
<!-- | **Total:** | **19** | | -->
| Totals | [](https://coveralls.io/builds/28061633) |
| :-- | --: |
| Change from base [Build 5512](https://coveralls.io/builds/28061631): | -0.004% |
| Covered Lines: | 24136 |
| Relevant Lines: | 87704 |
---
##### 💛 - [Coveralls](https://coveralls.io)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [kylin] nichunen commented on a change in pull request #1054: Fix
some insecure issues
Posted by GitBox <gi...@apache.org>.
nichunen commented on a change in pull request #1054: Fix some insecure issues
URL: https://github.com/apache/kylin/pull/1054#discussion_r366717931
##########
File path: core-common/src/main/java/org/apache/kylin/common/persistence/JDBCResourceStore.java
##########
@@ -44,28 +45,17 @@
public class JDBCResourceStore extends PushdownResourceStore {
- private static Logger logger = LoggerFactory.getLogger(JDBCResourceStore.class);
-
public static final String JDBC_SCHEME = "jdbc";
-
+ private static final ConcurrentHashMap<String, Object> resourceHashMap = new ConcurrentHashMap<>();
Review comment:
@hit-lacus Good idea
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [kylin] hit-lacus commented on a change in pull request #1054: Fix
some insecure issues
Posted by GitBox <gi...@apache.org>.
hit-lacus commented on a change in pull request #1054: Fix some insecure issues
URL: https://github.com/apache/kylin/pull/1054#discussion_r365637008
##########
File path: server/src/test/java/org/apache/kylin/rest/util/ValidateUtilTest.java
##########
@@ -48,6 +48,9 @@
@Test
public void testCheckIdentifiersExists() throws IOException {
+ String project = "/asd/../_asd33b";
+ project = ValidateUtil.convertStringToBeAlphanumericUnderscore(project);
Review comment:
Could we add some assertEqual for this `project`?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [kylin] codecov-io commented on issue #1054: Fix some insecure
issues
Posted by GitBox <gi...@apache.org>.
codecov-io commented on issue #1054: Fix some insecure issues
URL: https://github.com/apache/kylin/pull/1054#issuecomment-573421176
# [Codecov](https://codecov.io/gh/apache/kylin/pull/1054?src=pr&el=h1) Report
> Merging [#1054](https://codecov.io/gh/apache/kylin/pull/1054?src=pr&el=desc) into [master](https://codecov.io/gh/apache/kylin/commit/320c20f3db65a4d8fecc81d09832db79e44531f4?src=pr&el=desc) will **increase** coverage by `0.07%`.
> The diff coverage is `16.25%`.
[](https://codecov.io/gh/apache/kylin/pull/1054?src=pr&el=tree)
```diff
@@ Coverage Diff @@
## master #1054 +/- ##
============================================
+ Coverage 24.99% 25.06% +0.07%
- Complexity 6180 6224 +44
============================================
Files 1438 1438
Lines 87669 87704 +35
Branches 12257 12257
============================================
+ Hits 21913 21986 +73
+ Misses 63601 63570 -31
+ Partials 2155 2148 -7
```
| [Impacted Files](https://codecov.io/gh/apache/kylin/pull/1054?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [...kylin/common/metrics/metrics2/CodahaleMetrics.java](https://codecov.io/gh/apache/kylin/pull/1054/diff?src=pr&el=tree#diff-Y29yZS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2t5bGluL2NvbW1vbi9tZXRyaWNzL21ldHJpY3MyL0NvZGFoYWxlTWV0cmljcy5qYXZh) | `0% <ø> (ø)` | `0 <0> (ø)` | :arrow_down: |
| [...org/apache/kylin/measure/topn/TopNMeasureType.java](https://codecov.io/gh/apache/kylin/pull/1054/diff?src=pr&el=tree#diff-Y29yZS1tZXRhZGF0YS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUva3lsaW4vbWVhc3VyZS90b3BuL1RvcE5NZWFzdXJlVHlwZS5qYXZh) | `3.98% <0%> (ø)` | `3 <0> (ø)` | :arrow_down: |
| [...g/apache/kylin/rest/controller/CubeController.java](https://codecov.io/gh/apache/kylin/pull/1054/diff?src=pr&el=tree#diff-c2VydmVyLWJhc2Uvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2t5bGluL3Jlc3QvY29udHJvbGxlci9DdWJlQ29udHJvbGxlci5qYXZh) | `0% <0%> (ø)` | `0 <0> (ø)` | :arrow_down: |
| [...in/rest/broadcaster/BroadcasterReceiveServlet.java](https://codecov.io/gh/apache/kylin/pull/1054/diff?src=pr&el=tree#diff-c2VydmVyLWJhc2Uvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2t5bGluL3Jlc3QvYnJvYWRjYXN0ZXIvQnJvYWRjYXN0ZXJSZWNlaXZlU2VydmxldC5qYXZh) | `0% <0%> (ø)` | `0 <0> (ø)` | :arrow_down: |
| [.../apache/kylin/rest/controller/QueryController.java](https://codecov.io/gh/apache/kylin/pull/1054/diff?src=pr&el=tree#diff-c2VydmVyLWJhc2Uvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2t5bGluL3Jlc3QvY29udHJvbGxlci9RdWVyeUNvbnRyb2xsZXIuamF2YQ==) | `0% <0%> (ø)` | `0 <0> (ø)` | :arrow_down: |
| [...he/kylin/common/persistence/JDBCResourceStore.java](https://codecov.io/gh/apache/kylin/pull/1054/diff?src=pr&el=tree#diff-Y29yZS1jb21tb24vc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2t5bGluL2NvbW1vbi9wZXJzaXN0ZW5jZS9KREJDUmVzb3VyY2VTdG9yZS5qYXZh) | `0% <0%> (ø)` | `0 <0> (ø)` | :arrow_down: |
| [...ava/org/apache/kylin/rest/service/CubeService.java](https://codecov.io/gh/apache/kylin/pull/1054/diff?src=pr&el=tree#diff-c2VydmVyLWJhc2Uvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2t5bGluL3Jlc3Qvc2VydmljZS9DdWJlU2VydmljZS5qYXZh) | `0% <0%> (ø)` | `0 <0> (ø)` | :arrow_down: |
| [.../kylin/storage/hbase/steps/HFileOutputFormat3.java](https://codecov.io/gh/apache/kylin/pull/1054/diff?src=pr&el=tree#diff-c3RvcmFnZS1oYmFzZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUva3lsaW4vc3RvcmFnZS9oYmFzZS9zdGVwcy9IRmlsZU91dHB1dEZvcm1hdDMuamF2YQ==) | `0% <0%> (ø)` | `0 <0> (ø)` | :arrow_down: |
| [.../java/org/apache/kylin/rest/util/ValidateUtil.java](https://codecov.io/gh/apache/kylin/pull/1054/diff?src=pr&el=tree#diff-c2VydmVyLWJhc2Uvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2t5bGluL3Jlc3QvdXRpbC9WYWxpZGF0ZVV0aWwuamF2YQ==) | `0% <0%> (ø)` | `0 <0> (ø)` | :arrow_down: |
| [...rg/apache/kylin/source/hive/BeelineHiveClient.java](https://codecov.io/gh/apache/kylin/pull/1054/diff?src=pr&el=tree#diff-c291cmNlLWhpdmUvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2t5bGluL3NvdXJjZS9oaXZlL0JlZWxpbmVIaXZlQ2xpZW50LmphdmE=) | `3.84% <0%> (ø)` | `5 <0> (ø)` | :arrow_down: |
| ... and [14 more](https://codecov.io/gh/apache/kylin/pull/1054/diff?src=pr&el=tree-more) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/kylin/pull/1054?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/kylin/pull/1054?src=pr&el=footer). Last update [320c20f...20f9853](https://codecov.io/gh/apache/kylin/pull/1054?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [kylin] nichunen commented on a change in pull request #1054: Fix
some insecure issues
Posted by GitBox <gi...@apache.org>.
nichunen commented on a change in pull request #1054: Fix some insecure issues
URL: https://github.com/apache/kylin/pull/1054#discussion_r365649832
##########
File path: server/src/test/java/org/apache/kylin/rest/util/ValidateUtilTest.java
##########
@@ -48,6 +48,9 @@
@Test
public void testCheckIdentifiersExists() throws IOException {
+ String project = "/asd/../_asd33b";
+ project = ValidateUtil.convertStringToBeAlphanumericUnderscore(project);
Review comment:
@hit-lacus This is some code I submit carelessly, I have removed it
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [kylin] nichunen merged pull request #1054: Fix some insecure issues
Posted by GitBox <gi...@apache.org>.
nichunen merged pull request #1054: Fix some insecure issues
URL: https://github.com/apache/kylin/pull/1054
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services