- Issue created by @yuriy.korzhov
- Issue was unassigned.
- Status changed to Needs review
2 months ago 9:44am 6 October 2024
The function getLibraryData()
in /vendor/h5p/h5p-core/h5p.classes.php
does validation of a library languages files.
During the validation a language filename being analyzed like :
if (preg_match('/^(-?[a-z]+){1,7}\.json$/i', $languageFile) === 0) {
$this->h5pF->setErrorMessage($this->h5pF->t('Invalid language file %file in library %library', array('%file' => $languageFile, '%library' => $file)), 'invalid-language-file');
return FALSE;
}
This means only *.json files will be allowed, otherwise we will have an error message.
Some libraries contain *.gz language files in addition to *.json language files and we have error warnings when use getLibraryData()
function.
Similar to filenames "." and ".." we should allow *.json.gz files as well and not return an error.
Active
2.0
Code