From 7ccdc942feed4ac3edd772812f01520c2f76b62d Mon Sep 17 00:00:00 2001 From: johnnyq Date: Thu, 23 Jul 2026 00:59:07 -0400 Subject: [PATCH] Bump imapEngine from v1.25.2 to v1.25.3 --- functions/app.php | 16 ++++-------- guest/guest_ajax.php | 3 ++- libs/composer.lock | 22 ++++++++-------- libs/vendor/composer/autoload_psr4.php | 2 +- libs/vendor/composer/autoload_static.php | 4 +-- libs/vendor/composer/installed.json | 26 +++++++++---------- libs/vendor/composer/installed.php | 16 ++++++------ .../src/Connection/ImapTokenizer.php | 18 ++++++++++++- .../src/Serializers/Native.php | 8 ++++++ 9 files changed, 67 insertions(+), 48 deletions(-) diff --git a/functions/app.php b/functions/app.php index ce718eed..a3eb99a5 100644 --- a/functions/app.php +++ b/functions/app.php @@ -3,9 +3,7 @@ // App/UI helpers - icons, badges, lookups, mail queue, iCal, taxes, update check // Split from the former monolithic functions.php - -function getAssetIcon($asset_type) -{ +function getAssetIcon($asset_type) { if ($asset_type == 'Laptop') { $device_icon = "laptop"; } elseif ($asset_type == 'Desktop') { @@ -39,8 +37,7 @@ function getAssetIcon($asset_type) return $device_icon; } -function getInvoiceBadgeColor($invoice_status) -{ +function getInvoiceBadgeColor($invoice_status) { if ($invoice_status == "Sent") { $invoice_badge_color = "warning text-white"; } elseif ($invoice_status == "Viewed") { @@ -217,8 +214,7 @@ function checkForUpdates() { } -function getMonthlyTax($tax_name, $month, $year, $mysqli) -{ +function getMonthlyTax($tax_name, $month, $year, $mysqli) { // SQL to calculate monthly tax $sql = "SELECT SUM(item_tax) AS monthly_tax FROM invoice_items LEFT JOIN invoices ON invoice_items.item_invoice_id = invoices.invoice_id @@ -230,8 +226,7 @@ function getMonthlyTax($tax_name, $month, $year, $mysqli) return $row['monthly_tax'] ?? 0; } -function getQuarterlyTax($tax_name, $quarter, $year, $mysqli) -{ +function getQuarterlyTax($tax_name, $quarter, $year, $mysqli) { // Calculate start and end months for the quarter $start_month = ($quarter - 1) * 3 + 1; $end_month = $start_month + 2; @@ -278,8 +273,7 @@ function addToMailQueue($data) { return true; } -function createiCalStr($datetime, $title, $description, $location) -{ +function createiCalStr($datetime, $title, $description, $location) { require_once "libs/zapcal/zapcallib.php"; // Create the iCal object diff --git a/guest/guest_ajax.php b/guest/guest_ajax.php index 42adb7f2..8f268eda 100644 --- a/guest/guest_ajax.php +++ b/guest/guest_ajax.php @@ -95,8 +95,9 @@ if (isset($_GET['stripe_create_pi'])) { echo json_encode($output); - } catch (Exception $e) { + } catch (\Throwable $e) { http_response_code(500); + error_log("Stripe PI create failed (invoice $invoice_id): " . $e->getMessage()); echo json_encode(['error' => $e->getMessage()]); } diff --git a/libs/composer.lock b/libs/composer.lock index a5976732..9ea9a6f7 100644 --- a/libs/composer.lock +++ b/libs/composer.lock @@ -77,16 +77,16 @@ }, { "name": "directorytree/imapengine", - "version": "v1.25.2", + "version": "v1.25.3", "source": { "type": "git", "url": "https://github.com/DirectoryTree/ImapEngine.git", - "reference": "8d5652bc3fac749cd7cf6240afb594ef018c0069" + "reference": "62d4f4080683b1b1136720bec8c90354709298fe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/DirectoryTree/ImapEngine/zipball/8d5652bc3fac749cd7cf6240afb594ef018c0069", - "reference": "8d5652bc3fac749cd7cf6240afb594ef018c0069", + "url": "https://api.github.com/repos/DirectoryTree/ImapEngine/zipball/62d4f4080683b1b1136720bec8c90354709298fe", + "reference": "62d4f4080683b1b1136720bec8c90354709298fe", "shasum": "" }, "require": { @@ -127,7 +127,7 @@ ], "support": { "issues": "https://github.com/DirectoryTree/ImapEngine/issues", - "source": "https://github.com/DirectoryTree/ImapEngine/tree/v1.25.2" + "source": "https://github.com/DirectoryTree/ImapEngine/tree/v1.25.3" }, "funding": [ { @@ -135,7 +135,7 @@ "type": "github" } ], - "time": "2026-07-16T17:59:28+00:00" + "time": "2026-07-20T14:31:20+00:00" }, { "name": "doctrine/lexer", @@ -602,16 +602,16 @@ }, { "name": "laravel/serializable-closure", - "version": "v2.0.13", + "version": "v2.0.15", "source": { "type": "git", "url": "https://github.com/laravel/serializable-closure.git", - "reference": "b566ee0dd251f3c4078bed003a7ce015f5ea6dce" + "reference": "dccd8bcb851bb03fcc005df650b708b57cc52661" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/b566ee0dd251f3c4078bed003a7ce015f5ea6dce", - "reference": "b566ee0dd251f3c4078bed003a7ce015f5ea6dce", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/dccd8bcb851bb03fcc005df650b708b57cc52661", + "reference": "dccd8bcb851bb03fcc005df650b708b57cc52661", "shasum": "" }, "require": { @@ -659,7 +659,7 @@ "issues": "https://github.com/laravel/serializable-closure/issues", "source": "https://github.com/laravel/serializable-closure" }, - "time": "2026-04-16T14:03:50+00:00" + "time": "2026-07-21T16:49:22+00:00" }, { "name": "nesbot/carbon", diff --git a/libs/vendor/composer/autoload_psr4.php b/libs/vendor/composer/autoload_psr4.php index 59d73231..112ef67a 100644 --- a/libs/vendor/composer/autoload_psr4.php +++ b/libs/vendor/composer/autoload_psr4.php @@ -28,7 +28,7 @@ return array( 'Psr\\Clock\\' => array($vendorDir . '/psr/clock/src'), 'Laravel\\SerializableClosure\\' => array($vendorDir . '/laravel/serializable-closure/src'), 'Invoker\\' => array($vendorDir . '/php-di/invoker/src'), - 'Illuminate\\Support\\' => array($vendorDir . '/illuminate/macroable', $vendorDir . '/illuminate/conditionable', $vendorDir . '/illuminate/collections'), + 'Illuminate\\Support\\' => array($vendorDir . '/illuminate/collections', $vendorDir . '/illuminate/conditionable', $vendorDir . '/illuminate/macroable'), 'Illuminate\\Contracts\\' => array($vendorDir . '/illuminate/contracts'), 'GuzzleHttp\\Psr7\\' => array($vendorDir . '/guzzlehttp/psr7/src'), 'Egulias\\EmailValidator\\' => array($vendorDir . '/egulias/email-validator/src'), diff --git a/libs/vendor/composer/autoload_static.php b/libs/vendor/composer/autoload_static.php index 5c76e340..9c3def5c 100644 --- a/libs/vendor/composer/autoload_static.php +++ b/libs/vendor/composer/autoload_static.php @@ -177,9 +177,9 @@ class ComposerStaticInitbadf1d01c367c06fb591106ea3486c30 ), 'Illuminate\\Support\\' => array ( - 0 => __DIR__ . '/..' . '/illuminate/macroable', + 0 => __DIR__ . '/..' . '/illuminate/collections', 1 => __DIR__ . '/..' . '/illuminate/conditionable', - 2 => __DIR__ . '/..' . '/illuminate/collections', + 2 => __DIR__ . '/..' . '/illuminate/macroable', ), 'Illuminate\\Contracts\\' => array ( diff --git a/libs/vendor/composer/installed.json b/libs/vendor/composer/installed.json index 93df7c2f..ae023cc9 100644 --- a/libs/vendor/composer/installed.json +++ b/libs/vendor/composer/installed.json @@ -74,17 +74,17 @@ }, { "name": "directorytree/imapengine", - "version": "v1.25.2", - "version_normalized": "1.25.2.0", + "version": "v1.25.3", + "version_normalized": "1.25.3.0", "source": { "type": "git", "url": "https://github.com/DirectoryTree/ImapEngine.git", - "reference": "8d5652bc3fac749cd7cf6240afb594ef018c0069" + "reference": "62d4f4080683b1b1136720bec8c90354709298fe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/DirectoryTree/ImapEngine/zipball/8d5652bc3fac749cd7cf6240afb594ef018c0069", - "reference": "8d5652bc3fac749cd7cf6240afb594ef018c0069", + "url": "https://api.github.com/repos/DirectoryTree/ImapEngine/zipball/62d4f4080683b1b1136720bec8c90354709298fe", + "reference": "62d4f4080683b1b1136720bec8c90354709298fe", "shasum": "" }, "require": { @@ -99,7 +99,7 @@ "pestphp/pest": "^2.0|^3.0|^4.0", "spatie/ray": "^1.0" }, - "time": "2026-07-16T17:59:28+00:00", + "time": "2026-07-20T14:31:20+00:00", "type": "library", "installation-source": "dist", "autoload": { @@ -127,7 +127,7 @@ ], "support": { "issues": "https://github.com/DirectoryTree/ImapEngine/issues", - "source": "https://github.com/DirectoryTree/ImapEngine/tree/v1.25.2" + "source": "https://github.com/DirectoryTree/ImapEngine/tree/v1.25.3" }, "funding": [ { @@ -623,17 +623,17 @@ }, { "name": "laravel/serializable-closure", - "version": "v2.0.13", - "version_normalized": "2.0.13.0", + "version": "v2.0.15", + "version_normalized": "2.0.15.0", "source": { "type": "git", "url": "https://github.com/laravel/serializable-closure.git", - "reference": "b566ee0dd251f3c4078bed003a7ce015f5ea6dce" + "reference": "dccd8bcb851bb03fcc005df650b708b57cc52661" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/b566ee0dd251f3c4078bed003a7ce015f5ea6dce", - "reference": "b566ee0dd251f3c4078bed003a7ce015f5ea6dce", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/dccd8bcb851bb03fcc005df650b708b57cc52661", + "reference": "dccd8bcb851bb03fcc005df650b708b57cc52661", "shasum": "" }, "require": { @@ -646,7 +646,7 @@ "phpstan/phpstan": "^2.0", "symfony/var-dumper": "^6.2.0|^7.0.0|^8.0.0" }, - "time": "2026-04-16T14:03:50+00:00", + "time": "2026-07-21T16:49:22+00:00", "type": "library", "extra": { "branch-alias": { diff --git a/libs/vendor/composer/installed.php b/libs/vendor/composer/installed.php index 06968d79..a2e6da31 100644 --- a/libs/vendor/composer/installed.php +++ b/libs/vendor/composer/installed.php @@ -5,7 +5,7 @@ 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), - 'reference' => '9cc7e5ff3cdbb40dbee1aedd33418ddb668205fd', + 'reference' => '2b756f6ea4ca540c7f59b332a0168d76a5c8aaa3', 'name' => '__root__', 'dev' => false, ), @@ -16,7 +16,7 @@ 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), - 'reference' => '9cc7e5ff3cdbb40dbee1aedd33418ddb668205fd', + 'reference' => '2b756f6ea4ca540c7f59b332a0168d76a5c8aaa3', 'dev_requirement' => false, ), 'carbonphp/carbon-doctrine-types' => array( @@ -29,12 +29,12 @@ 'dev_requirement' => false, ), 'directorytree/imapengine' => array( - 'pretty_version' => 'v1.25.2', - 'version' => '1.25.2.0', + 'pretty_version' => 'v1.25.3', + 'version' => '1.25.3.0', 'type' => 'library', 'install_path' => __DIR__ . '/../directorytree/imapengine', 'aliases' => array(), - 'reference' => '8d5652bc3fac749cd7cf6240afb594ef018c0069', + 'reference' => '62d4f4080683b1b1136720bec8c90354709298fe', 'dev_requirement' => false, ), 'doctrine/lexer' => array( @@ -101,12 +101,12 @@ 'dev_requirement' => false, ), 'laravel/serializable-closure' => array( - 'pretty_version' => 'v2.0.13', - 'version' => '2.0.13.0', + 'pretty_version' => 'v2.0.15', + 'version' => '2.0.15.0', 'type' => 'library', 'install_path' => __DIR__ . '/../laravel/serializable-closure', 'aliases' => array(), - 'reference' => 'b566ee0dd251f3c4078bed003a7ce015f5ea6dce', + 'reference' => 'dccd8bcb851bb03fcc005df650b708b57cc52661', 'dev_requirement' => false, ), 'nesbot/carbon' => array( diff --git a/libs/vendor/directorytree/imapengine/src/Connection/ImapTokenizer.php b/libs/vendor/directorytree/imapengine/src/Connection/ImapTokenizer.php index 17e83f0a..2755ba06 100644 --- a/libs/vendor/directorytree/imapengine/src/Connection/ImapTokenizer.php +++ b/libs/vendor/directorytree/imapengine/src/Connection/ImapTokenizer.php @@ -387,6 +387,20 @@ class ImapTokenizer $this->advance(); } + // If no value was read, we will throw an exception since + // an atom must contain at least one valid character. + if ($value === '') { + if ($char === null) { + throw new ImapStreamException('Unexpected end of stream while reading atom'); + } + + throw new ImapParserException(sprintf( + 'Unexpected byte 0x%02X in response at buffer offset %d', + ord($char), + $this->position + )); + } + if (strcasecmp($value, 'NIL') === 0) { return new Nil($value); } @@ -437,7 +451,9 @@ class ImapTokenizer while ((strlen($this->buffer) - $this->position) < $length) { $data = $this->stream->fgets(); - if ($data === false) { + // If the stream did not return any data, we will stop + // filling the buffer until another read is attempted. + if ($data === false || $data === '') { return; } diff --git a/libs/vendor/laravel/serializable-closure/src/Serializers/Native.php b/libs/vendor/laravel/serializable-closure/src/Serializers/Native.php index 670500cc..8c608c7e 100644 --- a/libs/vendor/laravel/serializable-closure/src/Serializers/Native.php +++ b/libs/vendor/laravel/serializable-closure/src/Serializers/Native.php @@ -328,6 +328,10 @@ class Native implements Serializable */ protected function mapPointers(&$data) { + if ($data instanceof SerializableClosure || $data instanceof UnsignedSerializableClosure) { + return; + } + $scope = $this->scope; if ($data instanceof static) { @@ -363,6 +367,8 @@ class Native implements Serializable foreach ($data as $key => &$value) { if ($value instanceof SelfReference && $value->hash === $this->code['self']) { $data->{$key} = &$this->closure; + } elseif ($value instanceof static) { + $data->{$key} = &$value->closure; } elseif (is_array($value) || is_object($value)) { $this->mapPointers($value); } @@ -399,6 +405,8 @@ class Native implements Serializable 'property' => $property, 'object' => $item instanceof SelfReference ? $this : $item, ]; + } elseif ($item instanceof static) { + static::setPropertyValue($property, $data, $item->closure); } elseif (is_array($item) || is_object($item)) { $this->mapPointers($item); static::setPropertyValue($property, $data, $item);