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

Record Payment does not validate the length of the transaction ID string

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.5.1
    • Fix Version/s: 5.7.0-b1
    • Component/s: Staff Interface
    • Labels:
      None

      Description

      When recording a payment as staff for a client, the Check/ID field relates to the transactions.transaction_id column which is varchar(128) but it is possible to enter a value longer than 128 as the length is not validated.

      Instead, we should not allow a value larger than 128 to be submitted. Consider databases with a collation of utf8mb4.

      [2022-08-29T15:19:13.701421+00:00] general.ERROR: PDOException: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'transaction_id' at row 1 in /home/blestau/public_html/551/vendors/minphp/db/src/PdoConnection.php:196 Stack trace: #0 /home/blestau/public_html/551/vendors/minphp/db/src/PdoConnection.php(196): PDOStatement->execute(Array) #1 /home/blestau/public_html/551/vendors/minphp/record/src/Record.php(305): Minphp\Db\PdoConnection->query('INSERT INTO `tr...', Array) #2 /home/blestau/public_html/551/app/models/transactions.php(71): Minphp\Record\Record->insert('transactions', Array, Array) #3 /home/blestau/public_html/551/app/controllers/admin_clients.php(4392): Transactions->add(Array) #4 /home/blestau/public_html/551/vendors/minphp/bridge/src/Lib/Dispatcher.php(142): AdminClients->recordPayment() #5 /home/blestau/public_html/551/index.php(21): Dispatcher::dispatch('/551/admin/clie...') #6

      {main}

        Activity

        admin Paul Phillips created issue -
        admin Paul Phillips made changes -
        Field Original Value New Value
        Rank Ranked higher
        admin Paul Phillips made changes -
        Fix Version/s 5.5.2 [ 11736 ]
        jonathan Jonathan Reissmueller made changes -
        Fix Version/s 5.7.0-b1 [ 11737 ]
        Fix Version/s 5.6.0-b1 [ 11730 ]
        jonathan Jonathan Reissmueller made changes -
        Sprint 5.7.0 Sprint 1 [ 169 ]
        jonathan Jonathan Reissmueller made changes -
        Rank Ranked higher
        abdy Abdy Franco made changes -
        Assignee Abdy Franco [ abdy ]
        abdy Abdy Franco made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        abdy Abdy Franco made changes -
        Remaining Estimate 0 minutes [ 0 ]
        Time Spent 1 hour, 5 minutes [ 3900 ]
        Worklog Id 16031 [ 16031 ]
        abdy Abdy Franco made changes -
        Status In Progress [ 3 ] In Review [ 5 ]
        Resolution Fixed [ 1 ]
        jonathan Jonathan Reissmueller made changes -
        Sprint 5.7.0 Sprint 1 [ 169 ] 5.7.0 Sprint 1, 5.7.0 Sprint 2 [ 169, 171 ]
        jonathan Jonathan Reissmueller made changes -
        Rank Ranked higher
        jonathan Jonathan Reissmueller made changes -
        Status In Review [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            abdy Abdy Franco
            Reporter:
            admin Paul Phillips
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:
              Fix Release Date:
              4/May/23

              Time Tracking

              Estimated:
              Original Estimate - Not Specified
              Not Specified
              Remaining:
              Remaining Estimate - 0 minutes
              0m
              Logged:
              Time Spent - 1 hour, 5 minutes
              1h 5m

                Agile