Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POST Sanitization? #64

Open
backit opened this issue Oct 26, 2021 · 1 comment
Open

POST Sanitization? #64

backit opened this issue Oct 26, 2021 · 1 comment

Comments

@backit
Copy link

backit commented Oct 26, 2021

Hi,
it seems that you don't sanitize $_POST data, isn't it?
In P01contact_Form.php line 205:
* @param array $post Sanitized p01-contact data of $_POST
but checkSpam is called by post() line 184:
if ($hasFieldsErrors || $this->checkSpam($posted) !== true) {
and $posted is built by line161:
$posted = $_POST['p01-contact_fields'];
So it seems to me that there's no sanitization.

Maybe i'm wrong and missing something obvious...

@nliautaud
Copy link
Owner

The announced sanitization seems to be absent indeed.
The only use in checkSpam is to verify a bool for the honeypot, but it is used L170-171 to set the field values, that are processed trough htmlentities here.

I didn't analyse that further, feel free to propose an improvement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants