Skip to content

Filter sensitive user data from login endpoint response (Issue #698)#703

Open
anshul23102 wants to merge 1 commit into
GitMetricsLab:mainfrom
anshul23102:fix/698-login-endpoint-sensitive-data
Open

Filter sensitive user data from login endpoint response (Issue #698)#703
anshul23102 wants to merge 1 commit into
GitMetricsLab:mainfrom
anshul23102:fix/698-login-endpoint-sensitive-data

Conversation

@anshul23102
Copy link
Copy Markdown
Contributor

Summary

Exclude password hash from the user object returned in login endpoint response. This prevents credential leaks where sensitive password hashes could be extracted and potentially subjected to offline attacks.

Changes

  • Extract user object and remove password field before returning
  • Ensure login response contains only non-sensitive user properties
  • Prevents password hash exposure in JSON responses

Testing

  1. Log in with valid credentials
  2. Verify the response user object does NOT contain password field
  3. Verify response contains other user properties (username, email, etc.)
  4. Confirm password field is completely absent from response

Type of Change

  • Security fix

Contributor Declaration

This contribution is original work and I have the right to contribute this code to the project. I understand that the project is licensed under its respective license and my contributions will be available under the same license terms.

Closes #698

…ricsLab#698)

Exclude password hash from the user object returned in login endpoint response. This prevents credential leaks where sensitive password hashes could be extracted and potentially subjected to offline attacks.

Changes:
- Extract user object and remove password field before returning
- Ensure login response contains only non-sensitive user properties
- Prevents password hash exposure in JSON responses

Fixes GitMetricsLab#698
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 3, 2026

Warning

Review limit reached

@anshul23102, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 59 minutes and 49 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7cda7345-180f-4f88-a1cf-5432badcff41

📥 Commits

Reviewing files that changed from the base of the PR and between 53f820b and 434bed1.

📒 Files selected for processing (1)
  • backend/routes/auth.js
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 3, 2026

Deploy Preview for github-spy ready!

Name Link
🔨 Latest commit 434bed1
🔍 Latest deploy log https://app.netlify.com/projects/github-spy/deploys/6a209d01f95be30008165fe6
😎 Deploy Preview https://deploy-preview-703--github-spy.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@anshul23102
Copy link
Copy Markdown
Contributor Author

Could the maintainers please add relevant labels to this PR? Suggested labels:

  • gssoc:approved
  • type:security
  • severity:critical
  • area:security

This would help with issue tracking and organization. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Architecture: Login endpoint returns full user object including password hash in JSON response, enables potential hash extraction

1 participant