Skip to content

fix(tournaments): 오늘 대회 코드를 공개 API에서 숨김 - #31

Merged
cursor[bot] merged 1 commit into
mainfrom
cursor/fix-day-code-leak-c7bb
Oct 21, 2026
Merged

cursor[bot] merged 1 commit into
mainfrom
cursor/fix-day-code-leak-c7bb

Conversation

@rjsgud49

Copy link
Copy Markdown
Member

왜

오늘의 대회 코드는 현장에 있는 사람만 알게 하려는 확인 수단인데, GET /tournaments/:id/day-code가 로그인 없이 코드 값을 돌려주고 있었습니다. 누구나 코드를 읽어 원격으로 제출할 수 있습니다.

무엇을 바꿨나

  • 공개 조회는 서울 날짜와 코드 등록 여부(hasCode)만 반환합니다. 코드 문자열은 포함하지 않습니다.
  • 관리자와 그 대회를 연 운영자만 GET /tournaments/organized/:id/day-code로 값을 봅니다.
  • 다른 회원은 그 경로에서 거절되고, 코드 조회 쿼리도 실행되지 않습니다.

검증

  • npm test --prefix apps/api (104 passed)
  • npm run build --prefix apps/api
  • 웹을 바꿨다면 npm run build --prefix apps/web
  • AI를 바꿨다면 python3 -m unittest discover -s ai/tests -t ai

화면

해당 없음

마이그레이션

없음. 환경 변수 변경 없음.

Open in Web Open in Cursor 

현장 확인용 코드가 로그인 없이 조회되던 것을 막고, 운영자와 관리자만 값을 보게 했다.

Co-authored-by: park gun hyung <qkrrjsgud49@gmail.com>
@cursor
cursor Bot merged commit 29e3acf into main Oct 21, 2026
1 check passed
@cursor
cursor Bot deleted the cursor/fix-day-code-leak-c7bb branch October 21, 2026 00:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant