Skip to content

Security: Sanitize and limit login response - avoid leaking password hash in /api/auth/login #364

@adityack477

Description

@adityack477

The login route returns req.user directly to the client. The Mongoose User object includes the hashed password field. The response should omit sensitive fields (password, __v) before sending to the client.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions