Skip to content

Uploaded files: any file of the upload directory given as input is deleted, also before a retry #228

Closed

Description

@njoubert-cleverage

Regression of 3.4 (#209).

UploadedFileManager::deleteInput() deletes any input that is a file directly in upload_directory, not only the files the bundle has just written (the comment "never a file given by its path" is wrong):

  • an API user (ROLE_USER + token) sending input=/…/uploads/<file of another user> deletes it, e.g. a file still waiting in the asynchronous queue, whose execution then fails; the same with the launch form when entrypoint_type is text;
  • a ProcessSchedule (or a ui.default.input) whose input is a reference file of this directory loses it after its first execution.

Also, the input is deleted in a finally, so when the execution fails too: when the application configures retries (retry_strategy, failure_transport, messenger:failed:retry), the retried message runs without its file.

And a file written by HttpProcessExecuteValueResolver is never deleted when the request is rejected by the validation (422).

Fix:

  • an explicit flag in ProcessExecuteMessage (and for the synchronous HTTP execution), set only by LaunchAction and HttpProcessExecuteValueResolver for the file they have just written; never decide from the path only;
  • in the Messenger handler path, keep the file while the message will be retried;
  • delete the written file on a 422.

Found during the audit after the 3.4 release (audit-v4-post-release.md #216, #221, #222).

Activity

  1. added 2 commits that reference this issue on Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions