chore: remove debug console.log in API authentication handler#39232
Conversation
Remove stale console.log('shouldPreventAnonymousRead', ...) statement
that runs on every unauthenticated API request in production, adding
unnecessary noise to logs and bypassing the structured logging system.
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
|
WalkthroughRemoves a debug Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~1 minute Suggested labels
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). 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 |
|
/jira ARCH-2021 |
Remove stale
console.log('shouldPreventAnonymousRead', ...)statement that runs on every unauthenticated API request in production, adding unnecessary noise to logs and bypassing the structured logging system.Proposed changes (including videos or screenshots)
A debug
console.logstatement was left in the REST API authentication handler (apps/meteor/app/api/server/ApiClass.ts, line 838). This line:runs inside the
_internalRouteActionHandlerfunction on every unauthenticated API request, causing:@rocket.chat/loggerfor all logging, but this uses rawconsole.logThis PR simply removes the single
console.logline. No functional behavior is changed — the authentication logic (shouldPreventAnonymousRead,shouldPreventUserRead, and theapi.unauthorized()response) remains exactly the same.Issue(s)
Fixes #39231
Steps to test or reproduce
To reproduce the debug log:
curl http://localhost:3000/api/v1/channels.listshouldPreventAnonymousRead trueprinted to the server's stdoutTo verify the fix:
shouldPreventAnonymousReadmessage no longer appears in stdoutFurther comments
This is a minimal, zero-risk change — 1 file changed, 1 line deleted. No functional logic is altered.
Summary by CodeRabbit
Task: ARCH-2073