Commit 2dc6eb0f authored by AfirSraftGarrier's avatar AfirSraftGarrier

不安全的框架绑定

parent a1e6982e
...@@ -31,6 +31,11 @@ public class EncryptController { ...@@ -31,6 +31,11 @@ public class EncryptController {
@Value("${other.sm4-key}") @Value("${other.sm4-key}")
private String sm4Key; private String sm4Key;
@InitBinder
public void initBinder(WebDataBinder binder) {
binder.setDisallowedFields(new String[]{"adminCome"});
}
@ApiOperation(value = "数据加密") @ApiOperation(value = "数据加密")
@PostMapping("/encrypt") @PostMapping("/encrypt")
public ResResult<EncryptVo> encrypt(@RequestBody EncryptVo encryptVo) { public ResResult<EncryptVo> encrypt(@RequestBody EncryptVo encryptVo) {
......
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