Skip to content

Conversation

@Markus-Gurkcity
Copy link

Questions Answers
Description? The PS configuration PS_CUSTOMER_SERVICE_FILE_UPLOAD only removes content from the template. there must be a validation in the process/send method if this configuration is enabled. See extended description and screenshots below...
Type? bug fix / critical
BC breaks? no
Deprecations? no
Fixed ticket? Fixes PrestaShop/Prestashop#{issue number here}.
How to test? Please indicate how to best verify that this PR is correct.

Description:
in contactform module the PS configuration PS_CUSTOMER_SERVICE_FILE_UPLOAD is assigned to the template. If this configuration is false the upload file input and the form multipart attribute will be removed from the html:
image
image
The issue:
If a attacker modifies the html form in the browser and adds the form file upload input, the file will be send to prestashop an will be uploaded.
image
Fix:
check the configuration at the process/send method and reject any file uploads:
image

@ps-jarvis
Copy link

Hello @Markus-Gurkcity!

This is your first pull request on contactform repository of the PrestaShop project.

Thank you, and welcome to this Open Source community!

@github-project-automation github-project-automation bot moved this to Ready for review in PR Dashboard Oct 16, 2025
@Hlavtox Hlavtox added this to the 4.4.4 milestone Nov 15, 2025
Copy link
Contributor

@matthieu-rolland matthieu-rolland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you @Markus-Gurkcity

@paulnoelcholot here is checking that the configuration allows file upload on the backend side, so that it's not possible to bypass this just by modifying the html in the browser

Copy link

@paulnoelcholot paulnoelcholot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QA by dev, since the How to Test is a bit hard to follow for a manual QA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Ready for review

Development

Successfully merging this pull request may close these issues.

6 participants