Made it possible to bypass file extension check.
parent
062a8921e2
commit
072edf55e7
|
@ -1369,7 +1369,7 @@ class H5PCore {
|
|||
public static $defaultContentWhitelist = 'json png jpg jpeg gif bmp tif tiff svg eot ttf woff otf webm mp4 ogg mp3 txt pdf rtf doc docx xls xlsx ppt pptx odt ods odp xml csv diff patch swf md textile';
|
||||
public static $defaultLibraryWhitelistExtras = 'js css';
|
||||
|
||||
public $librariesJsonData, $contentJsonData, $mainJsonData, $h5pF, $path, $development_mode, $h5pD;
|
||||
public $librariesJsonData, $contentJsonData, $mainJsonData, $h5pF, $path, $development_mode, $h5pD, $disableFileCheck;
|
||||
private $exportEnabled;
|
||||
|
||||
/**
|
||||
|
@ -2114,6 +2114,10 @@ class H5PContentValidator {
|
|||
* FALSE if one or more files fail validation. Error message should be set accordingly by validator.
|
||||
*/
|
||||
public function validateContentFiles($contentPath, $isLibrary = FALSE) {
|
||||
if ($this->h5pC->disableFileCheck === TRUE) {
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
// Scan content directory for files, recurse into sub directories.
|
||||
$files = array_diff(scandir($contentPath), array('.','..'));
|
||||
$valid = TRUE;
|
||||
|
|
Loading…
Reference in New Issue