Few Options to avoid this - Sanitize the input - Use prepared statement - Dont just Return true and false have an object return which can be checked before completing the circuit ORM is a good option but it is always not the answer when you are writing a backend in something like Go or C# its always good to understand why and how these problems can be avoided rather than just plain out ootb solutions
Solution: Use Body validation... Avoid special characters, and allow few
Why are so many Indian tech YouTubers popping up these days? Because in India, if you fail computer science, you don’t change careers— you just start a YouTube channel and teach it instead!
Prepared statements, parameterized queries used in those old php days. Today ORM is the solution in python and node, in Java spring JPA.
Just use the hash package. Or my solution is to create two modules 1) base64encode 2)base64decode Then make them a perfect encryptor with a random tokenization method and more layers. then receive the input values as encrypted, then SQL it then if matched decrypt them and show or store the state., When creating an account, make sure you encrypt values and store them in a table or database. That's easy, right?
1st make credentials as encrypted (This make any sql injection to another shape) and then send data through response body (This makes data hidden through out the API)..
If we use laravel then we can use htmlspecialchar function that filter the data if user enter any html data or any query then it will filter it and don't allow that
The easiest way to avoid this would be to not accept special characters. If you are just a student you can start there.
If you are running direct SQL queries based on user input, you have bigger things to worry about
use parameterized query , removes special character using regex , input type checking , also remote access limitation( server accessible by only a certain host )
That's why in java Preparedstatement if using JDBC , else if using ORM , you don't even write queries :)
Try this User : 'or 1=1 limit 1 -- -+ Pass : 'or 1=1 limit 1 -- -+
is ka solution in HTML = {% crf token %} before script of login page (For Django)
To say this in simple terms. Some tutorials teaches entire software engineering
Thats why i use nosql
That's why you should use body validation schemas
Solution: always sanitize the user inputs for any malicious input
Road blocks, authentication, is one..
Just Use prepared Method and use validation ✅
@MHGAMERZ369