5 require_once(
'./libs/composer/vendor/autoload.php');
30 $fileHeaderStart = hex2bin(
'FFD8FF');
31 $trailer = hex2bin(
'FFD9');
36 $result = $subject->process($stream,
new Metadata(
'hello.jpg', $stream->getSize(),
'image/jpg'));
39 $this->assertSame(
'File header complies with whitelist.', $result->getMessage());
48 $fileHeaderWhitelist = hex2bin(
'FFD8FF');
49 $fileHeaderStart = hex2bin(
'FFD8FB');
50 $trailer = hex2bin(
'FFD9');
55 $result = $subject->process($stream,
new Metadata(
'hello.jpg', $stream->getSize(),
'image/jpg'));
58 $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 $string)
Creates a new stream with an initial value.