Skip to content

Application image may not be cleaned up with concurrent uploads #1047

Description

@jmattheis

When concurrently uploading new images for the same application, it's possible that the old image isn't deleted correctly.

UploadApplicationImage reads the current app image, saves the new file, deletes the old file, and then updates the database. When two uploads for the same application run concurrently, both read the same old image name and both delete it. Only the last database update will be applied. The file written by the other request stays on disk but is no longer referenced by any application.

Reported privately by @ry2811

Activity

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

    a:bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions