Skip to content
This repository has been archived by the owner on May 11, 2021. It is now read-only.

User Input Sanitation #9

Open
billyb2 opened this issue Aug 2, 2020 · 4 comments
Open

User Input Sanitation #9

billyb2 opened this issue Aug 2, 2020 · 4 comments

Comments

@billyb2
Copy link
Contributor

billyb2 commented Aug 2, 2020

This will be an ongoing issue, but it should be out here as a reminder. Both the front and backend need to validate and sanitize user Input, whether that means making sure emails look valid, passwords are above 8 characters, slurs aren't aloud in usernames, SQL queries are sanitized, etc.

@Susorodni
Copy link
Contributor

How am I supposed to "sanitize" queries?

@billyb2
Copy link
Contributor Author

billyb2 commented Aug 2, 2020

Nah sanitizing queries is a backend thing, but for the front end, stuff like limiting username and password lengths, not allowing racial slurs, etc @Susorodni

@billyb2
Copy link
Contributor Author

billyb2 commented Aug 2, 2020

I'd sanitize queries to prevent SQL injection from occuring.

https://www.w3schools.com/sql/sql_injection.asp

@billyb2
Copy link
Contributor Author

billyb2 commented Aug 4, 2020

@Susorodni it'd be great if you made sure that only alphanumeric characters were allowed to be sent by the frontend. Maybe that and all these special characters:
+_-!#@

This would prevent a lot of easily preventable attacks. Also filtering out words like admin, root, etc. Most noobie hackers or people trying to pretend to be an admin would be stopped by that. I would do the same filtering on the backend, to prevent people manually sending requests (like with Insomnia).

Like as an example, for the register form, only allow a certain set of characters, to prevent SQL injection.

@billyb2 billyb2 transferred this issue from another repository Aug 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants