ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
FilenameSanitizer.php
Go to the documentation of this file.
1<?php
2
4
19{
20
24 const CLEAN_FILE_SUFFIX = 'sec';
25
36 public function isClean(string $filename) : bool;
37
38
47 public function sanitize(string $filename) : string;
48}
$filename
Definition: buildRTE.php:89
An exception for terminatinating execution or to throw for unit testing.
const CLEAN_FILE_SUFFIX
This file suffix will be used to sanitize not whitelisted file names.
isClean(string $filename)
Checks if the filename is prefixed with a valid whitelisted ending.
sanitize(string $filename)
Validates the file ending, with the filesystem whitelist provided by ILIAS.