5 require_once(
'./libs/composer/vendor/autoload.php');
31 $fileHeaderStart = hex2bin(
'FFD8FF');
32 $trailer = hex2bin(
'FFD9');
37 $result = $subject->process($stream,
new Metadata(
'hello.jpg', $stream->getSize(),
'image/jpg'));
40 $this->assertSame(
'File header complies with whitelist.',
$result->getMessage());
49 $fileHeaderWhitelist = hex2bin(
'FFD8FF');
50 $fileHeaderStart = hex2bin(
'FFD8FB');
51 $trailer = hex2bin(
'FFD9');
56 $result = $subject->process($stream,
new Metadata(
'hello.jpg', $stream->getSize(),
'image/jpg'));
59 $this->assertSame(
'File header don\'t complies with whitelist.',
$result->getMessage());
const REJECTED
Upload got rejected by a processor.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static ofString($string)
Creates a new stream with an initial value.