Uploaded image for project: 'Blesta Core'
  1. Blesta Core
  2. CORE-2753

Invoice PDF may be delivered to wrong email

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.3.0
    • Component/s: None
    • Labels:
      None

      Description

      This issue is a race condition possible when one of the following is true:

      1. The cron's deliver invoices task is run multiple times simultaneously (this shouldn't occur during normal operation since a task cannot be run if it's already running)
      2. The cron's deliver invoices task is run at the same time that someone manually sends an invoice for the company
      3. One or more persons manually sends multiple invoices simultaneously through separate actions (e.g. an admin sends invoices for one client while another admin sends different invoices for a different client)

      In such cases, it's possible that between the time that the invoice PDF is generated and when it is sent, a new invoice PDF is generated for a different set of invoice(s) for the same company, which saves the file to disk with the same name at the same time.

      1. Update the filename saved on disk to be more unique to the invoice(s) being sent so one set of invoices being delivered cannot be overwritten by another

        Activity

        Automated transition triggered when Tyson Phillips (Inactive) merged pull request #487 in Stash -
        Status In Review [ 5 ] Closed [ 6 ]
        tyson Tyson Phillips (Inactive) made changes -
        Remaining Estimate 0 minutes [ 0 ]
        Time Spent 35 minutes [ 2100 ]
        Worklog Id 11351 [ 11351 ]
        Automated transition triggered when Tyson Phillips (Inactive) created pull request #487 in Stash -
        Status In Progress [ 3 ] In Review [ 5 ]
        Resolution Fixed [ 1 ]
        Automated transition triggered when Tyson Phillips (Inactive) created a branch in Stash -
        Status Open [ 1 ] In Progress [ 3 ]
        tyson Tyson Phillips (Inactive) made changes -
        Rank Ranked higher
        tyson Tyson Phillips (Inactive) made changes -
        Field Original Value New Value
        Sprint 4.3.0 Sprint 12 [ 63 ]
        tyson Tyson Phillips (Inactive) created issue -

          People

          • Assignee:
            tyson Tyson Phillips (Inactive)
            Reporter:
            tyson Tyson Phillips (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              18/Jul/18

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 35 minutes
              35m

                Agile