- Issue created by @SirClickALot
- 🇬🇧United Kingdom SirClickALot Somerset
EDIT: This is not just in Presentations, it appears to happen in multiple different H5P content types.
- Status changed to Needs review
over 1 year ago 9:43am 9 June 2023 - 🇬🇧United Kingdom SirClickALot Somerset
Thanks @Adil_Siddiqui → , patch in #3 seems to have fixed it.
- Status changed to RTBC
over 1 year ago 5:36am 12 June 2023 - 🇨🇦Canada ryanrobinson_wlu
I can replicate this problem (PHP 8.1 tests). Patch worked after adding it to my composer.json like this, updating the h5p/h5p-editor package in vendor, not patching the Drupal module:
"patches": { "h5p/h5p-editor": { "Drupal issue 3364451: Fixed file upload error for PHP 8.1": "./patches/h5p_files_3364451-3.patch" } }
I'm hoping to see all these PHP 8.1 and Drupal 10 patches rolled into a proper release soon.
- Status changed to Needs review
12 months ago 7:05am 14 December 2023 - 🇩🇪Germany stefan.korn Jossgrund
Question is whether FILTER_UNSAFE_RAW is a replacement for FILTER_SANITIZE_STRING. Imho it is not. Reading https://www.php.net/manual/de/filter.filters.sanitize.php the recommendation is to use htmlspecialchars() and FILTER_SANITIZE_FULL_SPECIAL_CHARS is defined as "Equivalent to calling htmlspecialchars() with ENT_QUOTES set". So FILTER_SANITIZE_FULL_SPECIAL_CHARS might be a better replacement as FILTER_UNSAFE_RAW, but it is still not the same as FILTER_SANITIZE_STRING.
So assuming that FILTER_SANITIZE_STRING was used for a purpose, FILTER_UNSAFE_RAW is probably not fulfilling that purpose.
- 🇲🇾Malaysia akmalfikri
I'm +1 with @stefan.korn.
As per fix proposed by @otacke here : https://github.com/h5p/h5p-editor-php-library/commit/69b7ffdcbfd72e087cd... they are proposing to use FILTER_SANITIZE_FULL_SPECIAL_CHARS instead of FILTER_UNSAFE_RAW