From b9701a8bb8f940febd4b6e02c3f1339482c80d8b Mon Sep 17 00:00:00 2001 From: Meirza Date: Thu, 27 Oct 2022 16:46:51 +0700 Subject: [PATCH] MDL-73624 lib_spout: encode output file name --- lib/spout/readme_moodle.txt | 9 +++++++++ lib/spout/src/Spout/Writer/WriterAbstract.php | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/spout/readme_moodle.txt b/lib/spout/readme_moodle.txt index 01be63e4c00..610f180e728 100644 --- a/lib/spout/readme_moodle.txt +++ b/lib/spout/readme_moodle.txt @@ -4,6 +4,15 @@ Description of Spout library import * Only include the src/Spout directory. * Update lib/thirdpartylibs.xml with the latest version. +2022/10/27 +---------- +Changes: +Box/Spout has been archived and is no longer maintained, +MDL-73624 needs to fix with a couple of minor changes to +Writer/WriterAbstract.php. The changes replace rawurldecode() with +rawurlencode() in lines 143 and 144. +by Meirza + 2022/01/05 ---------- Update to v3.3.0 (MDL-73497) diff --git a/lib/spout/src/Spout/Writer/WriterAbstract.php b/lib/spout/src/Spout/Writer/WriterAbstract.php index 36a583fe62f..15e58fdf961 100644 --- a/lib/spout/src/Spout/Writer/WriterAbstract.php +++ b/lib/spout/src/Spout/Writer/WriterAbstract.php @@ -140,8 +140,8 @@ abstract class WriterAbstract implements WriterInterface $this->globalFunctionsHelper->header('Content-Type: ' . static::$headerContentType); $this->globalFunctionsHelper->header( 'Content-Disposition: attachment; ' . - 'filename="' . rawurldecode($this->outputFilePath) . '"; ' . - 'filename*=UTF-8\'\'' . rawurldecode($this->outputFilePath) + 'filename="' . rawurlencode($this->outputFilePath) . '"; ' . + 'filename*=UTF-8\'\'' . rawurlencode($this->outputFilePath) ); /*