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

Demonstrate proper security (do not use req.body directly) #159

Open
glebec opened this issue Feb 21, 2019 · 1 comment
Open

Demonstrate proper security (do not use req.body directly) #159

glebec opened this issue Feb 21, 2019 · 1 comment

Comments

@glebec
Copy link
Member

glebec commented Feb 21, 2019

const user = await User.create(req.body)

Whatever we show students, they inevitably emulate in future projects – even when we explicitly state that it is an antipattern, there for education. Accordingly, I think we should extract the properties we want from req.body (or blacklist sensitive properties) rather than pass it directly to .create.

@collin
Copy link
Contributor

collin commented Apr 9, 2019

💯 ✖️ 💯

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