Config (Full) Import form does not validate file extensions

Created on 31 January 2016, almost 9 years ago
Updated 14 March 2023, over 1 year ago

Problem/Motivation

It is possible to upload files with arbitrary extensions into the config full import form. The files then fail extraction, but the file extension is not validated in the first place.

The security team is happy with this being a public hardening issue because only those with a restricted permission can access this form

Proposed resolution

Validate the file extensions. We cannot rely on the regular #upload_validators for this because those only work for managed files.

Steps to reproduce

Remaining tasks

Update the patch
Add tests
Review
Commit

User interface changes

Instead of cryptic error messages from the tar extractor, a proper error message is displayed when uploading incorrect files in the config import form.

API changes

None.

Data model changes

None.

📌 Task
Status

Needs work

Version

9.5

Component
Config 

Last updated 3 months ago

Created by

🇩🇪Germany tstoeckler Essen, Germany

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024