From 72bb2560cdfa8897219e5ccf85af15fce6145342 Mon Sep 17 00:00:00 2001 From: Shawn Bulen Date: Mon, 11 Nov 2024 13:05:05 -0800 Subject: [PATCH] Some string recasts needed for exports Signed by Shawn Bulen, bulens@pacbell.net --- Sources/Actions/Profile/ExportDownload.php | 2 +- Sources/Tasks/ExportProfileData.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/Actions/Profile/ExportDownload.php b/Sources/Actions/Profile/ExportDownload.php index cdb0441da9..e2a7693646 100644 --- a/Sources/Actions/Profile/ExportDownload.php +++ b/Sources/Actions/Profile/ExportDownload.php @@ -173,7 +173,7 @@ protected function __construct() $this->export_dir_slash = Config::$modSettings['export_dir'] . DIRECTORY_SEPARATOR; - $this->idhash = hash_hmac('sha1', Utils::$context['id_member'], Config::getAuthSecret()); + $this->idhash = hash_hmac('sha1', (string) Utils::$context['id_member'], Config::getAuthSecret()); $this->dltoken = hash_hmac('sha1', $this->idhash, Config::getAuthSecret()); $this->part = isset($_GET['part']) ? (int) $_GET['part'] : 1; diff --git a/Sources/Tasks/ExportProfileData.php b/Sources/Tasks/ExportProfileData.php index 35ec7b2b7f..fa289f6bbc 100644 --- a/Sources/Tasks/ExportProfileData.php +++ b/Sources/Tasks/ExportProfileData.php @@ -1267,7 +1267,7 @@ protected function exportHtml(): void // Determine which files, if any, are ready to be transformed. $export_dir_slash = Config::$modSettings['export_dir'] . DIRECTORY_SEPARATOR; - $idhash = hash_hmac('sha1', $this->_details['uid'], Config::getAuthSecret()); + $idhash = hash_hmac('sha1', (string) $this->_details['uid'], Config::getAuthSecret()); $idhash_ext = $idhash . '.' . $this->_details['format_settings']['extension']; $new_exportfiles = [];