Problem/Motivation

In this Drupal application, file or media fields may allow unsafe or overly broad file extensions (for example executable or script types), which increases the risk of malicious files being uploaded and potentially executed or served to end users.

Steps to reproduce

Proposed resolution

Add a new Security FitCheck group entry with the plugin FileUploadExtensionCheck that:

  • FileUploadExtensionCheck – scans all file/media field configurations for their allowed extensions, failing with FitWeight::High when dangerous or unrestricted extensions are detected and listing the affected fields/content types.
  • FileUploadSchemeCheck – optionally verifies that uploaded files are stored on non-executable schemes/paths (e.g. private or non-executable public locations), failing with FitWeight::Medium when uploads are placed under executable paths.

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork drupalfit-3558972

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

harivansh created an issue. See original summary.

harivansh’s picture

Issue summary: View changes
harivansh’s picture

Issue summary: View changes
shubham.prakash’s picture

Assigned: Unassigned » shubham.prakash
shubham.prakash’s picture

StatusFileSize
new13.79 KB
shubham.prakash’s picture

Assigned: shubham.prakash » Unassigned
shubham.prakash’s picture

Status: Active » Needs review

harivansh’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

harivansh’s picture

Status: Fixed » Closed (fixed)
harivansh’s picture

StatusFileSize
new8.85 KB
harivansh’s picture

.