Skip to content

important fix: process uploads only if configuration allows it - #83

Open
Markus-Gurkcity wants to merge 1 commit into
PrestaShop:devfrom
Markus-Gurkcity:security_fix_upload_disable
Open

important fix: process uploads only if configuration allows it#83
Markus-Gurkcity wants to merge 1 commit into
PrestaShop:devfrom
Markus-Gurkcity:security_fix_upload_disable

Conversation

@Markus-Gurkcity

Copy link
Copy Markdown
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
Copy Markdown

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

@matthieu-rolland matthieu-rolland left a comment

Copy link
Copy Markdown
Contributor

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

@paulnoelcholot paulnoelcholot left a comment

Copy link
Copy Markdown

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

@Touxten Touxten self-assigned this Feb 12, 2026
@Touxten Touxten closed this Feb 25, 2026
@github-project-automation github-project-automation Bot moved this from Ready for review to Closed in PR Dashboard Feb 25, 2026
@Touxten Touxten reopened this Feb 25, 2026
@github-project-automation github-project-automation Bot moved this from Closed to Reopened in PR Dashboard Feb 25, 2026
@Quetzacoalt91 Quetzacoalt91 modified the milestones: 5.0.0, 5.0.1 Sep 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Reopened

Development

Successfully merging this pull request may close these issues.

8 participants