Feedback - Server Side validation is required for the Subscribe form.
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 333
- Forks
- 127
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 11
Description
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)
- Go to Learn WordPress
- Scroll down to the Sign up for updates section, open the browser's inspect tool, and remove the
requiredparameter. - Click on the Subscribe button.
- Now, a popup for Learn WordPress will open.
- Again, open the inspect tool and remove the
requiredparameter 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
Screenshots or screen recording (optional)
https://github.com/user-attachments/assets/4ec3fe38-8d0f-4415-9ecb-e62b0b977e3e
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No implementation file, test, or server entry point is named. Start by tracing the Learn WordPress Subscribe form and its first popup submission into the server-side handler; done means required fields are validated there and the missing-email case displays an error without the reported JSON console error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100