You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Server-side validation occurs on the server after the data has been submitted.
Currently, if a user removes a required parameter using the browser's inspect tool, no validation is triggered when the popup opens for the first time. However, if the user removes the required parameter again, an error is generated in the console, preventing the process from proceeding.
Scroll down to the Sign up for updates section, open the browser's inspect tool, and remove the required parameter.
Click on the Subscribe button.
Now, a popup for Learn WordPress will open.
Again, open the inspect tool and remove the required parameter from the popup form.
Again Click on the Subscribe button.
Now, you will see that there is no error displayed for the required email field. However, the console shows the following error: Uncaught SyntaxError: "[object Object]" is not valid JSON
Make sure to check all form fields on the server, especially the ones marked as required. This will help avoid errors and protect the form from security issues like SQL injection and cross-site scripting (XSS).
Validating the input on the server is important because even if someone tries to change the form data using tools like inspect element, the data will still be checked and secured before being processed.
If you have any questions or concerns, just let me know.
Thank you.
The text was updated successfully, but these errors were encountered:
If this is reporting an issue, can you confirm/reproduce the issue? Yes
Comment :
Yes, I can confirm that the issue is reproducible. I have tested the form multiple times, and the problem persists under various conditions. Specifically, the issue occurs when briefly describe the specific conditions or steps to reproduce the issue, e.g., when submitting the form without filling in required fields.
What should happen next to apply the feedback?: Server side validation should be implemented.
Comment :
I recommend implementing server-side validation for all form fields, especially those marked as required. This will ensure that any data submitted is properly validated before processing, which will help prevent errors and protect against security vulnerabilities such as SQL injection and cross-site scripting (XSS). Additionally, server-side validation will provide a more robust user experience by ensuring that users receive appropriate feedback when they submit invalid data.
Type of feedback
// dev
Description
Server-side validation occurs on the server after the data has been submitted.
Currently, if a user removes a required parameter using the browser's inspect tool, no validation is triggered when the popup opens for the first time. However, if the user removes the required parameter again, an error is generated in the console, preventing the process from proceeding.
Step-by-step reproduction instructions (optional)
required
parameter.required
parameter from the popup form.Uncaught SyntaxError: "[object Object]" is not valid JSON
Screenshots or screen recording (optional)
Learn.WordPress.-.There.s.always.more.to.learn._.Learn.WordPress.mp4
Suggested Fix
Make sure to check all form fields on the server, especially the ones marked as
required.
This will help avoid errors and protect the form from security issues like SQL injection and cross-site scripting (XSS).Validating the input on the server is important because even if someone tries to change the form data using tools like inspect element, the data will still be checked and secured before being processed.
If you have any questions or concerns, just let me know.
Thank you.
The text was updated successfully, but these errors were encountered: