Unverified Commit 9bdaa221 authored by sgsdehen's avatar sgsdehen Committed by GitHub

[Fix] [dinky-admin] unsafe interfaces /readFile (#3383)

Signed-off-by: 's avatarzhaorenyi <zhaorenyi@joyy.com> Signed-off-by: 's avatarsgsdehen <zxingye7@163.com> Co-authored-by: 's avatarsgsdehen <595150622@qq.com>
parent 31023788
......@@ -33,6 +33,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import cn.dev33.satoken.annotation.SaCheckLogin;
import cn.dev33.satoken.annotation.SaCheckPermission;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
......@@ -81,6 +82,7 @@ public class SystemController {
@GetMapping("/readFile")
@ApiOperation("Read File By File Path")
@ApiImplicitParam(name = "path", value = "File Path", required = true, dataType = "String")
@SaCheckLogin
public Result<String> readFile(@RequestParam String path) {
return Result.data(systemService.readFile(path));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment