Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Shubhofficial1 opened this issue Jan 2, 2024 · 1 comment
Open

Comments

@Shubhofficial1
Copy link

Shubhofficial1 commented Jan 2, 2024

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");

@Govind-Upadhyay-12
Copy link

solved check my pullr request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants