Open kimhanui opened 4 years ago
@GetMapping("/log/find/user/{userId}") //<-- 아무나 다른 사람 학번치면 조회가능 public ResponseEntity<List<JudgeLogResponseDto>> find(@PathVariable String userId) throws Exception { List<JudgeLogResponseDto> resDtos = service.findByMember(userId); ResponseEntity<List<JudgeLogResponseDto>> entity = new ResponseEntity<>(resDtos, HttpStatus.OK); return entity; } @GetMapping("/log/find/track/{trackId}") //<-- 트랙 치면 누구든 조회됨 public ResponseEntity<List<JudgeLogResponseDto>> find(@PathVariable Long trackId) throws Exception { List<JudgeLogResponseDto> resDtos = service.findByTrack(trackId); ResponseEntity<List<JudgeLogResponseDto>> entity = new ResponseEntity<>(resDtos, HttpStatus.OK); return entity; }
회원가입할때 멤버에 고유 uuid값을 생성 & Member 엔티티에 uuid 값을 넣을 필드 하나 만들고 (Uuid는 대충 고유한 랜덤값임 ㅇㅇ) 조회할때 세션에 멤버 있으니까 여기서 uuid값을 꺼내서 조회하는건 어떰? --> 세션값 uuid 이용
그럼 자신의 uuid로만 조회할수 있고 다른사람 uuid는 때려맞출수 없음.
세션에 있는 uuid 탈취의 가능성은?
현재 :
방향:
회원가입할때 멤버에 고유 uuid값을 생성 &
Member 엔티티에 uuid 값을 넣을 필드 하나 만들고
(Uuid는 대충 고유한 랜덤값임 ㅇㅇ)
조회할때 세션에 멤버 있으니까
여기서 uuid값을 꺼내서 조회하는건 어떰? --> 세션값 uuid 이용
그럼 자신의 uuid로만 조회할수 있고
다른사람 uuid는 때려맞출수 없음.
더 생각할 수 있는 이슈:
세션에 있는 uuid 탈취의 가능성은?