[Snyk] Upgrade chart.js from 4.4.2 to 4.4.3#10
Closed
Conversation
Snyk has created this PR to upgrade chart.js from 4.4.2 to 4.4.3. See this package in npm: chart.js See this project in Snyk: https://app.snyk.io/org/respencer/project/bcafe9f2-0544-4595-877e-01a68c123c9e?utm_source=github&utm_medium=referral&page=upgrade-pr
pull bot
pushed a commit
that referenced
this pull request
Jun 17, 2025
# Description & Issue number it closes <!-- Please include a summary of the changes and the related issue. Please also include relevant motivation and context. --> Only display error details for SLIM if the application is in debug level closes ChurchCRM#7240 ## How to test the changes? Before - ``` Content-Type: text/html;charset=UTF-8 <!doctype html><html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Slim Application Error</title> <style> body{margin:0;padding:30px;font:12px/1.5 Helvetica,Arial,Verdana,sans-serif} h1{margin:0;font-size:48px;font-weight:normal;line-height:48px} strong{display:inline-block;width:65px} </style> </head> <body> <h1>Slim Application Error</h1> <div><p>The application could not run because of the following error:</p><h2>Details</h2><div><strong>Type:</strong> TypeError</div><div><strong>Code:</strong> 0</div><div><strong>Message:</strong> Slim\Exception\HttpSpecializedException::__construct(): Argument #1 ($request) must be of type Psr\Http\Message\ServerRequestInterface, string given, called in /var/www/html/session/routes/password-reset.php on line 80</div><div><strong>File:</strong> /var/www/html/vendor/slim/slim/Slim/Exception/HttpSpecializedException.php</div><div><strong>Line:</strong> 23</div><h2>Trace</h2><pre>#0 /var/www/html/session/routes/password-reset.php(80): Slim\Exception\HttpSpecializedException->__construct() #1 /var/www/html/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(38): userPasswordReset() #2 /var/www/html/vendor/slim/slim/Slim/Routing/Route.php(363): Slim\Handlers\Strategies\RequestResponse->__invoke() #3 /var/www/html/vendor/slim/slim/Slim/MiddlewareDispatcher.php(73): Slim\Routing\Route->handle() #4 /var/www/html/vendor/slim/slim/Slim/MiddlewareDispatcher.php(73): Slim\MiddlewareDispatcher->handle() #5 /var/www/html/vendor/slim/slim/Slim/Routing/Route.php(321): Slim\MiddlewareDispatcher->handle() #6 /var/www/html/vendor/slim/slim/Slim/Routing/RouteRunner.php(74): Slim\Routing\Route->run() #7 /var/www/html/vendor/slim/slim/Slim/Middleware/ErrorMiddleware.php(77): Slim\Routing\RouteRunner->handle() #8 /var/www/html/vendor/slim/slim/Slim/MiddlewareDispatcher.php(129): Slim\Middleware\ErrorMiddleware->process() #9 /var/www/html/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php(45): Psr\Http\Server\RequestHandlerInterface@anonymous->handle() #10 /var/www/html/vendor/slim/slim/Slim/MiddlewareDispatcher.php(129): Slim\Middleware\RoutingMiddleware->process() #11 /var/www/html/ChurchCRM/Slim/Middleware/VersionMiddleware.php(14): Psr\Http\Server\RequestHandlerInterface@anonymous->handle() #12 /var/www/html/vendor/slim/slim/Slim/MiddlewareDispatcher.php(280): ChurchCRM\Slim\Middleware\VersionMiddleware->__invoke() #13 /var/www/html/vendor/slim/slim/Slim/MiddlewareDispatcher.php(73): Psr\Http\Server\RequestHandlerInterface@anonymous->handle() #14 /var/www/html/vendor/slim/slim/Slim/App.php(209): Slim\MiddlewareDispatcher->handle() #15 /var/www/html/vendor/slim/slim/Slim/App.php(193): Slim\App->handle() #16 /var/www/html/session/index.php(90): Slim\App->run() #17 {main}</pre></div> <a href="#" onclick="window.history.go(-1)">Go Back</a> </body></html>% ``` **After** ``` CRM % curl --path-as-is -i -s -k -X $'POST' \ -H $'Host: localhost' -H $'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36' -H $'Accept: */*' -H $'Accept-Language: en-US,en;q=0.5' -H $'Accept-Encoding: gzip, deflate, br' -H $'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' -H $'X-Requested-With: XMLHttpRequest' -H $'Content-Length: 23' -H $'Origin: http://localhost' -H $'Connection: keep-alive' -H $'Referer: http://localhost/session/forgot-password/reset-request' -H $'sec-ch-ua-platform: \"Windows\"' -H $'sec-ch-ua: \"Google Chrome\";v=\"117\", \"Chromium\";v=\"117\", \"Not=A?Brand\";v=\"24\"' -H $'sec-ch-ua-mobile: ?0' -H $'Priority: u=0' \ -b $'CRM-<redacted>=<redacted>' \ --data-binary $'{\"userName\":\"fakeUser\"}' \ $'http://localhost/session/forgot-password/reset-request' HTTP/1.1 500 Internal Server Error Date: Mon, 03 Feb 2025 00:56:20 GMT Server: Apache/2.4.62 (Debian) X-Powered-By: PHP/8.4.2 Set-Cookie: CRM-40d1b2d83998fabacb726e5bc3d22129=5ef343dac86e3f4708ea2cba8168ae05; path=/ CRM_VERSION: 5.14.0 Content-Length: 672 Connection: close Content-Type: text/html;charset=UTF-8 <!doctype html><html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Slim Application Error</title> <style> body{margin:0;padding:30px;font:12px/1.5 Helvetica,Arial,Verdana,sans-serif} h1{margin:0;font-size:48px;font-weight:normal;line-height:48px} strong{display:inline-block;width:65px} </style> </head> <body> <h1>Slim Application Error</h1> <div><p>A website error has occurred. Sorry for the temporary inconvenience.</p></div> <a href="#" onclick="window.history.go(-1)">Go Back</a> </body></html>% ``` ## Type of change - [x] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] This change requires a documentation update # How Has This Been Tested? <!-- Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration --> # Checklist: - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published in downstream modules
pull bot
pushed a commit
that referenced
this pull request
Oct 19, 2025
…andling (ChurchCRM#7417) ## Problem Users were encountering unclear errors when attempting to run database backups from the Admin menu. The error message was cryptic and didn't indicate the root cause: ``` Error making API Call to: /api/database/backup Error text: Unable to create backup archive at /volume1/wwwroot/ChurchCRM-3.0.5/tmp_attach/ChurchCRMBackups/... ``` The underlying issue was that when the backup temporary directory couldn't be created (typically due to permission issues), the `mkdir()` call would fail silently. The code would continue execution and fail later when attempting to write backup files to the non-existent directory, resulting in confusing error messages. ## Solution Added proper error handling to the `createEmptyTempFolder()` method in `src/ChurchCRM/Backup/JobBase.php`. The fix: 1. **Checks if directory creation succeeds** - Verifies the return value of `mkdir()` 2. **Handles edge cases** - Doesn't throw an exception if the directory already exists 3. **Provides clear error messages** - Includes: - The exact path where creation failed - The underlying system error message - Actionable guidance to check web server permissions 4. **Logs errors appropriately** - Ensures issues are captured for debugging ### Code Change ```php // Before: No error checking mkdir($TempFolder, 0750, true); // After: Proper error handling if (!mkdir($TempFolder, 0750, true) && !is_dir($TempFolder)) { $error = error_get_last(); $message = 'Failed to create backup directory at ' . $TempFolder; if ($error) { $message .= ': ' . $error['message']; } $message .= '. Please ensure the web server has write permissions to the parent directory.'; LoggerUtils::getAppLogger()->error($message); throw new \Exception($message, 500); } ``` ## Benefits - **Early failure detection** - Errors are caught immediately when directory creation fails - **Clear error messages** - Users get actionable information about what went wrong and how to fix it - **Better debugging** - Errors are properly logged for system administrators - **Broader impact** - Fixes both backup AND restore operations since both inherit from `JobBase` ## Testing - Verified logic with multiple test scenarios (normal operation, existing directory, permission denied) - PHP syntax validation passed - No breaking changes or side effects Fixes #8846 (referenced in the issue comments about permission-related backup failures) <!-- START COPILOT CODING AGENT SUFFIX --> <details> <summary>Original prompt</summary> ---- *This section details on the original issue you should resolve* <issue_title>Failed to Run Backup Database</issue_title> <issue_description>Hi, Encounter error when run Backup Database from the Admin menu. The directory and file has permission 755 & 744 receptively. Following is the error reported. Error making API Call to: /api/database/backup Error text: Unable to create backup archive at /volume1/wwwroot/ChurchCRM-3.0.5/tmp_attach/ChurchCRMBackups/SIBKLChineseChurch-Database.sql] ``` [ "#0 /volume1/wwwroot/ChurchCRM-3.0.5/api/routes/system/system-database.php(31): ChurchCRM\\Service\\SystemService->getDatabaseBackup(Object(stdClass))", "#1 [internal function]: Closure->{closure}(Object(Slim\\Http\\Request), Object(Slim\\Http\\Response), Array)", "#2 /volume1/wwwroot/ChurchCRM-3.0.5/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(41): call_user_func(Object(Closure), Object(Slim\\Http\\Request), Object(Slim\\Http\\Response), Array)", "#3 /volume1/wwwroot/ChurchCRM-3.0.5/vendor/slim/slim/Slim/Route.php(335): Slim\\Handlers\\Strategies\\RequestResponse->__invoke(Object(Closure), Object(Slim\\Http\\Request), Object(Slim\\Http\\Response), Array)", "#4 /volume1/wwwroot/ChurchCRM-3.0.5/ChurchCRM/Slim/Middleware/Role/BaseAuthRoleMiddleware.php(27): Slim\\Route->__invoke(Object(Slim\\Http\\Request), Object(Slim\\Http\\Response))", "#5 [internal function]: ChurchCRM\\Slim\\Middleware\\Role\\BaseAuthRoleMiddleware->__invoke(Object(Slim\\Http\\Request), Object(Slim\\Http\\Response), Object(Slim\\Route))", "#6 /volume1/wwwroot/ChurchCRM-3.0.5/vendor/slim/slim/Slim/DeferredCallable.php(43): call_user_func_array(Object(ChurchCRM\\Slim\\Middleware\\Role\\AdminRoleAuthMiddleware), Array)", "#7 [internal function]: Slim\\DeferredCallable->__invoke(Object(Slim\\Http\\Request), Object(Slim\\Http\\Response), Object(Slim\\Route))", "#8 /volume1/wwwroot/ChurchCRM-3.0.5/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\\DeferredCallable), Object(Slim\\Http\\Request), Object(Slim\\Http\\Response), Object(Slim\\Route))", "#9 /volume1/wwwroot/ChurchCRM-3.0.5/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\\Route->Slim\\{closure}(Object(Slim\\Http\\Request), Object(Slim\\Http\\Response))", "#10 /volume1/wwwroot/ChurchCRM-3.0.5/vendor/slim/slim/Slim/Route.php(313): Slim\\Route->callMiddlewareStack(Object(Slim\\Http\\Request), Object(Slim\\Http\\Response))", "#11 /volume1/wwwroot/ChurchCRM-3.0.5/vendor/slim/slim/Slim/App.php(495): Slim\\Route->run(Object(Slim\\Http\\Request), Object(Slim\\Http\\Response))", "#12 /volume1/wwwroot/ChurchCRM-3.0.5/ChurchCRM/Slim/Middleware/VersionMiddleware.php(13): Slim\\App->__invoke(Object(Slim\\Http\\Request), Object(Slim\\Http\\Response))", "#13 [internal function]: ChurchCRM\\Slim\\Middleware\\VersionMiddleware->__invoke(Object(Slim\\Http\\Request), Object(Slim\\Http\\Response), Object(Slim\\App))", "#14 /volume1/wwwroot/ChurchCRM-3.0.5/vendor/slim/slim/Slim/DeferredCallable.php(43): call_user_func_array(Object(ChurchCRM\\Slim\\Middleware\\VersionMiddleware), Array)", "#15 [internal function]: Slim\\DeferredCallable->__invoke(Object(Slim\\Http\\Request), Object(Slim\\Http\\Response), Object(Slim\\App))", "#16 /volume1/wwwroot/ChurchCRM-3.0.5/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\\DeferredCallable), Object(Slim\\Http\\Request), Object(Slim\\Http\\Response), Object(Slim\\App))", "#17 /volume1/wwwroot/ChurchCRM-3.0.5/ChurchCRM/Slim/Middleware/AuthMiddleware.php(42): Slim\\App->Slim\\{closure}(Object(Slim\\Http\\Request), Object(Slim\\Http\\Response))", "#18 [internal function]: ChurchCRM\\Slim\\Middleware\\AuthMiddleware->__invoke(Object(Slim\\Http\\Request), Object(Slim\\Http\\Response), Object(Closure))", "#19 /volume1/wwwroot/ChurchCRM-3.0.5/vendor/slim/slim/Slim/DeferredCallable.php(43): call_user_func_array(Object(ChurchCRM\\Slim\\Middleware\\AuthMiddleware), Array)", "#20 [internal function]: Slim\\DeferredCallable->__invoke(Object(Slim\\Http\\Request), Object(Slim\\Http\\Response), Object(Closure))", "#21 /volume1/wwwroot/ChurchCRM-3.0.5/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\\DeferredCallable), Object(Slim\\Http\\Request), Object(Slim\\Http\\Response), Object(Closure))", "#22 /volume1/wwwroot/ChurchCRM-3.0.5/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\\App->Slim\\{closure}(Object(Slim\\Http\\Request), Object(Slim\\Http\\Response))", "#23 /volume1/wwwroot/ChurchCRM-3.0.5/vendor/slim/slim/Slim/App.php(388): Slim\\App->callMiddlewareStack(Object(Slim\\Http\\Request), Object(Slim\\Http\\Response))", "#24 /volume1/wwwroot/ChurchCRM-3.0.5/vendor/slim/slim/Slim/App.php(296): Slim\\App->process(Object(Slim\\Http\\Request), Object(Slim\\Http\\Response))", "#25 /volume1/wwwroot/ChurchCRM-3.0.5/api/index.php(75): Slim\\App->run()", "#26 {main}" ] ``` ... </details> Fixes ChurchCRM#4300 <!-- START COPILOT CODING AGENT TIPS --> --- 💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click [here](https://survey3.medallia.com/?EAHeSx-AP01bZqG0Ld9QLQ) to start the survey.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was automatically created by Snyk using the credentials of a real user.

Snyk has created this PR to upgrade chart.js from 4.4.2 to 4.4.3.
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
The recommended version is 1 version ahead of your current version.
The recommended version was released on 21 days ago.
Release notes
Package name: chart.js
-
4.4.3 - 2024-05-17
- npm
- Migration guide
- Docs
- API
- Samples
- #11754 Fix error when object prototype is frozen
- #11764 do not attempt to clear canvas if one does not exist
- #11755 #11450 hide bar by dataindex
- #11690 Create parsed object with correct keys
- #11707 platform.isAttached should return false if canvas is false-y
- #11762 Update license year
- #11776 Bump to 4.4.3
- #11773 Bump pnpm/action-setup from 3.0.0 to 4.0.0
- #11720 Bump follow-redirects from 1.15.4 to 1.15.6
-
4.4.2 - 2024-02-28
- npm
- Migration guide
- Docs
- API
- Samples
- #11685 addListener and removeListener should be only invoked on truthy values
- #11682 fix #11503, autoskipping 0 tick when min is below 0
- #11616 fix(#11615): fix calculating caretX position on stacked bar with index interaction.
- #11662 bugfix #10896 - Changed 'r' to optional for BubbleChart
- #11674 docs(types): fix description in index.d.ts
- #11614 Add extra calrification for html legend
- #11689 Bump to 4.4.2
- #11664 Bump pnpm/action-setup from 2.4.0 to 3.0.0
- #11657 Bump release-drafter/release-drafter from 5 to 6
- #11650 Bump dorny/paths-filter from 2 to 3
- #11636 Bump socket.io-parser from 4.2.2 to 4.2.4
- #11635 Bump follow-redirects from 1.15.2 to 1.15.4
- #11633 Update pnpm lockfile
from chart.js GitHub release notesEssential Links
Bugs Fixed
Documentation
Development
Thanks to @ DAcodedBEAT, @ EricWittrock, @ LeeLenaleee, @ LiamSwayne, @ dependabot and @ dependabot[bot]
Essential Links
Bugs Fixed
Types
Documentation
Development
Thanks to @ DAcodedBEAT, @ LeeLenaleee, @ Megaemce, @ dependabot, @ dependabot[bot], @ mirumirumi, @ smoonsf and @ waszkiewiczja
Important
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information: