From f0760c69e3d5c761b6aa02772ea8b75c5f905de1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Wed, 23 Jun 2021 12:39:51 +0200 Subject: [PATCH] Use `HeaderUtil::sendNoCacheHeaders()` in `UserExportGdprAction` --- .../files/lib/acp/action/UserExportGdprAction.class.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/wcfsetup/install/files/lib/acp/action/UserExportGdprAction.class.php b/wcfsetup/install/files/lib/acp/action/UserExportGdprAction.class.php index 7762964eb6..568865fe1b 100644 --- a/wcfsetup/install/files/lib/acp/action/UserExportGdprAction.class.php +++ b/wcfsetup/install/files/lib/acp/action/UserExportGdprAction.class.php @@ -14,6 +14,7 @@ use wcf\system\exception\IllegalLinkException; use wcf\system\exception\PermissionDeniedException; use wcf\system\option\user\UserOptionHandler; use wcf\system\WCF; +use wcf\util\HeaderUtil; use wcf\util\UserUtil; /** @@ -239,13 +240,10 @@ class UserExportGdprAction extends AbstractAction $this->data['@@generatedAt'] = TIME_NOW; - // header @\header('Content-type: application/json; charset=UTF-8'); @\header('Content-disposition: attachment; filename="user-export-gdpr-' . $this->user->userID . '.json"'); - // no cache headers - @\header('Pragma: no-cache'); - @\header('Expires: 0'); + HeaderUtil::sendNoCacheHeaders(); echo \json_encode($this->data, \JSON_PRETTY_PRINT); -- 2.20.1