修复漏洞问题
This commit is contained in:
parent
cff5536b04
commit
4e8974b2f7
|
|
@ -31,9 +31,9 @@ public interface RemoteLogService
|
||||||
* @throws Exception 异常
|
* @throws Exception 异常
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@PostMapping("/operlog")
|
// @PostMapping("/operlog")
|
||||||
public R<Boolean> saveLog(@RequestBody SysOperLog sysOperLog, @RequestHeader(SecurityConstants.FROM_SOURCE) String source) throws Exception;
|
// public R<Boolean> saveLog(@RequestBody SysOperLog sysOperLog, @RequestHeader(SecurityConstants.FROM_SOURCE) String source) throws Exception;
|
||||||
|
//
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存系统日志
|
* 保存系统日志
|
||||||
|
|
|
||||||
|
|
@ -31,11 +31,11 @@ public class RemoteLogFallbackFactory implements FallbackFactory<RemoteLogServic
|
||||||
log.error("日志服务调用失败:{}", throwable.getMessage());
|
log.error("日志服务调用失败:{}", throwable.getMessage());
|
||||||
return new RemoteLogService()
|
return new RemoteLogService()
|
||||||
{
|
{
|
||||||
@Override
|
// @Override
|
||||||
public R<Boolean> saveLog(SysOperLog sysOperLog, String source)
|
// public R<Boolean> saveLog(SysOperLog sysOperLog, String source)
|
||||||
{
|
// {
|
||||||
return R.fail("保存操作日志失败:" + throwable.getMessage());
|
// return R.fail("保存操作日志失败:" + throwable.getMessage());
|
||||||
}
|
// }
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public R<Boolean> addLogs(SysLogsVo sysLogsVo, String source) throws Exception {
|
public R<Boolean> addLogs(SysLogsVo sysLogsVo, String source) throws Exception {
|
||||||
|
|
|
||||||
|
|
@ -25,11 +25,11 @@ public class AsyncLogService
|
||||||
/**
|
/**
|
||||||
* 保存系统日志记录
|
* 保存系统日志记录
|
||||||
*/
|
*/
|
||||||
@Async
|
// @Async
|
||||||
public void saveSysLog(SysOperLog sysOperLog) throws Exception
|
// public void saveSysLog(SysOperLog sysOperLog) throws Exception
|
||||||
{
|
// {
|
||||||
remoteLogService.saveLog(sysOperLog, SecurityConstants.INNER);
|
// remoteLogService.saveLog(sysOperLog, SecurityConstants.INNER);
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -115,13 +115,13 @@ public class SecurityUtils
|
||||||
return passwordEncoder.matches(rawPassword, encodedPassword);
|
return passwordEncoder.matches(rawPassword, encodedPassword);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
// public static void main(String[] args) {
|
||||||
//$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2
|
////$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2
|
||||||
//$2a$10$zvlw3Mu8M.j.MhAChrYwluj88ziX6lVD3AoRrBQpwKMcdIZvKMoR2
|
// //$2a$10$zvlw3Mu8M.j.MhAChrYwluj88ziX6lVD3AoRrBQpwKMcdIZvKMoR2
|
||||||
// String msg= encryptPassword("Admin@1234");
|
//// String msg= encryptPassword("Admin@1234");
|
||||||
String msg= encryptPassword("admin123");
|
// String msg= encryptPassword("Bonus$2024");
|
||||||
boolean rest = matchesPassword("admin123","$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2");
|
// boolean rest = matchesPassword("admin123","$2a$10$5azz92OgGRyRUETz/ZJeZu1exkggPYUDRssvreywTjKk.0Pmn2Q16");
|
||||||
System.err.println(msg);
|
// System.err.println(msg);
|
||||||
System.err.println(rest);
|
// System.err.println(rest);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue