Conversation
+ 문자가 url 디코딩되며 공백으로 변경됨에 따라 토큰 폐기 실패 변경 후: + 문자를 %2B로 인코딩해서 전송
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughThe access_token parameter in NaverOAuthClient's revoke method is now passed as a URI template placeholder Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary of ChangesHello @huhdy32, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 Pull Request는 네이버 OAuth 연동 시 access token에 포함된 '+' 문자가 잘못 인코딩되어 토큰 폐기 요청이 실패하던 문제를 해결합니다. RestClient의 URI 빌더에서 템플릿 변수 바인딩을 활용하여 access token이 올바르게 퍼센트 인코딩되도록 함으로써, 안정적인 토큰 관리 기능을 제공합니다. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
네이버 OAuth 토큰 폐기 시 access token의 인코딩 문제를 수정한 PR이군요. RestClient와 URI 템플릿 변수를 사용하여 +와 같은 특수 문자가 올바르게 인코딩되도록 한 점이 좋습니다. 이는 Spring에서 권장하는 안전한 방법입니다. 한편, 코드의 일관성과 안정성을 높이기 위해 클래스 내 다른 API 호출에도 동일한 인코딩 방식을 적용하는 것을 고려해보시면 좋을 것 같습니다. 관련하여 상세한 의견을 리뷰 코멘트로 남겼습니다.
문제
query param으로 전달되는 access token에
+문자가 존재할 시,네이버 oauth 서버의 디코딩 과정에서 access token의
+이 공백으로 치환됨.이에 따라 토큰 폐기 실패하는 문제가 있었음.
해결
RestClient에서 당연히 인코딩 처리해줄줄 알았으나,문서 내용을 읽어보니, ASCII 위반 문자만 개별적으로 인코딩하도록 함 ㅠ
-> UTF-8인코딩 후, 퍼센트 인코딩으로 해결
+) restClient에서 템플릿 변수 바인딩을 통해
strict encoding적용https://docs.spring.io/spring-framework/reference/web/webmvc/mvc-uri-building.html
Summary by CodeRabbit