Skip to content

Commit

Permalink
Improve App Key check in tools.php
Browse files Browse the repository at this point in the history
  • Loading branch information
freescout-help-desk committed Jul 17, 2024
1 parent 5a22011 commit 60ac03d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions public/tools.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,15 @@ function clearCache($root_dir, $php_path)
if (!$php_path) {
$php_path = 'php';
}

// Sanitize path.
// https://github.com/freescout-helpdesk/freescout/security/advisories/GHSA-7p9x-ch4c-vqj9
if (!file_exists($php_path)) {
$php_path = 'php';
}
}

if (trim($app_key) != trim(getAppKey($root_dir))) {
if (trim($app_key) !== trim(getAppKey($root_dir))) {
$errors['app_key'] = 'Invalid App Key';
} else {
if (!function_exists('shell_exec')) {
Expand Down

0 comments on commit 60ac03d

Please sign in to comment.