Skip to content

[DEFECT] Workflow action bypasses folder file extension restrictions (fileMasks) #33422

Closed

Description

@zJaaal

Problem Statement

When using a workflow action to publish a temp file to a specified folder, we can publish the file even if the folder is restricted to a selected group of extensions on the fileMasks property. It should fail and provide an error message that tells the user which kind of files can be published to the specified folder.

This impacts users who rely on folder file extension restrictions for content governance and security. The system should enforce these restrictions consistently across all publishing methods.

Steps to Reproduce

  1. Create a folder with allowed file extensions as: *.pdf
  2. Publish a file that is not a .pdf by using the temp API and copy the temp id
  3. Use the workflow actions API to publish the temp file using the following body:
{
    "contentlet": {
        "baseType": "dotAsset",
        "asset": "<temp-id-from-temp-api>",
        "hostFolder": "<folder-id-of-recently-created-folder>",
        "indexPolicy": "WAIT_FOR"
    }
}
  1. See that the file was published (this should fail but currently succeeds)

Here is an example using Content Drive:

Screen.Recording.2025-10-01.at.11.59.09.AM.mov

Acceptance Criteria

  • Workflow actions API validates file extensions against folder fileMasks property
  • Publishing a file with non-allowed extension to a restricted folder fails with appropriate error
  • Error message clearly indicates which file extensions are allowed in the target folder
  • Existing functionality for allowed file types continues to work as expected

dotCMS Version

Latest from main branch

Severity

High - Major functionality broken

Activity

  1. added theissue type on Oct 1, 2025
  2. added
    OKR : Core Features
    java
    and removed on Oct 1, 2025
  3. moved this from New to Next Sprint in dotCMS - Product Planningon Oct 1, 2025
  4. 12 remaining items

  5. zJaaal commented on Nov 14, 2025

    @zJaaal
    MemberAuthor

    QA Passed

    Now the upload action does not bypasses the File Extension Restrictions

    Screen.Recording.2025-11-14.at.5.57.22.PM.mov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions