Security Announcement
Don't let them exploit your leniency!
We'll cover the following
Never echo without any safety precautions
Using echo
without any safety precautions is a dangerous thing to do.
Try this: Run the code below, and open the application in a new tab. In the number field, fill in 4" onclick="alert('Hellooooo')
.
Now submit the form.
Nothing looks off, and the number 4 still shows up in the form field.
Now, click on the number field.
Not a pleasant surprise!
Get hands-on with 1400+ tech skills courses.