Skip to content

Remove User's Hashed passwords access from /users endpoint. #34

Description

@Shubhofficial1

https://github.com/bradtraversy/proshop-v2/blob/2e3eb75f94caa23108663b19eac7945020409410/backend/controllers/userController.js#L124C26-L124C26

Even for admin , access should be restricted.

Issue line : 124 : const users = await User.find({});

Fix : const users = await User.find({}).select("-password");

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions